[PyQt] subprocess in PyQt
klia
alwaseem307ster at yahoo.com
Sat Mar 14 09:24:34 GMT 2009
Mads Ipsen-3 wrote:
>
>>
>> Hello guys;
>>
>> 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)
>>
>> but i keep getting this error
>>
>> waseem at home:~/Desktop/Project2/GUI$ python wrapphotodb.py
>> Traceback (most recent call last):
>> File "wrapphotodb.py", line 37, in _addphotoClicked
>> y=Popen(['>','Exif.csv'], stdin=x.stdout)
>> File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
>> errread, errwrite)
>> File "/usr/lib/python2.5/subprocess.py", line 1153, in _execute_child
>> raise child_exception
>> OSError: [Errno 2] No such file or directory
>>
>> Any idea? is my syntax correct?
>> --
>> View this message in context:
>> http://www.nabble.com/subprocess-in-PyQt-tp22510022p22510022.html
>> Sent from the PyQt mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> PyQt mailing list PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>
>
> Why don't you try to use a QProcess from spawning external processes? I
> have a good success ratio with that approach.
>
> Mads
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
Okay how am i going to use it? i read for sometimes i couldn't understand
--
View this message in context: http://www.nabble.com/subprocess-in-PyQt-tp22510022p22510772.html
Sent from the PyQt mailing list archive at Nabble.com.
More information about the PyQt
mailing list