[pygtk] Subprocess and changing it's priority
Vláďa
vladovi at atlas.cz
Mon Feb 25 19:49:29 WST 2008
Hello,
I have a GUI program which runs some CLI processes. I use modified code
of this module:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554
It is a black magic for me. :-)
Then I run the CLI application:
self.p =
subprocess2.Popen(cmd,shell=False,bufsize=0,stdout=subprocess2.PIPE,stderr=subprocess2.STDOUT)
and add a callback:
gobject.timeout_add(200,self.progress_callback)
Everything works fine. But I'd like to add an option to change priority
of the process I started. It is a video encoder, so it uses 100% of CPU
and takes hours to finish. So you might want to lower it's priority. Is
there an easy way do do it? Thank you.
Best regards,
Vlada
More information about the pygtk
mailing list