[PyQt] subprocess in PyQt

klia alwaseem307ster at yahoo.com
Sun Mar 15 03:21:27 GMT 2009




Ville M. Vainio wrote:
> 
> On Sat, Mar 14, 2009 at 9:17 AM, klia <alwaseem307ster at yahoo.com> wrote:
> 
>> i have a function that suppose to do something and from terminal it has
>> this
>> syntax to be executed;
>>
>> waseem at home:~/Desktop/Project2/GUI$ python myexif.py -q "pathfile" >
>> test.csv
>>
>> so far on using subprocess i came up with this;
>>
>> from subprocess import *
>> x=Popen(['python','myexif','-q','sys.argv[1]'], stdout=PIPE)
>> y=Popen(['>','Exif.csv'], stdin=x.stdout)
> 
> the y=... line doesn't make much sense.
> 
> Why not just do os.system('myexif.py -q "pathfile" > test.csv') and be
> done with it? If you don't care about your UI blocking for a second,
> it should be rather trouble-free...
> 
> -- 
> Ville M. Vainio
> http://tinyurl.com/vainio
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> 

Thank you ville
it's working.................
-- 
View this message in context: http://www.nabble.com/subprocess-in-PyQt-tp22510022p22519764.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list