[PyQt] subprocess in PyQt
Ville M. Vainio
vivainio at gmail.com
Sat Mar 14 21:24:11 GMT 2009
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
More information about the PyQt
mailing list