Python Forum

Full Version: Problem keeping the window up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
i figured it out, had to add wait...
This is the code that worked.

#!/usr/bin/python3

this is the 'starter.py' file
import subprocess
p=subprocess.Popen(["gnome-terminal","--","/home/graham/Desktop/backupwatcher/backup-client.py"])
p.wait()
Thanks to everyone that took the time to help Smile
(Jan-23-2020, 05:13 PM)tamilselvisubbiah Wrote: [ -> ]i am new to python coding. Just wrote code to filter the first column of pvs output and redirect to one file. below is my code .while running i am getting error variable value not giving output from sys import stdin import os import sys import subprocess import shutil import datetime #import commands today = datetime.datetime.today() global vgname vgname=raw_input("enter the vgname: ") cmd='(pvs | grep + vgname) | (awk \'{print $1}\') > sel.txt' os.system(cmd) [root@localhost Python-3.6.3]# python rack.py enter the vgname: vg01 grep: vgname: No such file or directory [root@localhost Python-3.6.3]# Some one please help me to fix this
Pages: 1 2