[PyQt] QProcess problems/question
Andreas Pakulat
apaku at gmx.de
Tue Jun 17 23:42:45 BST 2008
On 17.06.08 18:57:51, Gustavo A. Díaz wrote:
> Could you give me a little tip of how i could solve this by using QProcess?
> If not much to ask
> I am reading about setEnviroment() but i dont understand exactly which is
> the steps i should follow as starting point.
Well, lets say you want to start "yourapp" with http_proxy variable set
to http://somehost:8184. Then you'd just do
p = QProcess()
env = QProcess.systemEnvironment()
env.append( "http_proxy=http://somehost:8184" )
p.setEnvironment(env)
p.start( "yourapp" )
This would start "yourapp" as if you'd have done the following in a
shell:
export http_proxy=http://somehost:8184
yourapp
As I said before you can only change the environment of processes you
start from your code, you can't influence environment settings of
already running processes.
If you still have problems, please be more precise whats not working and
show some code.
Andreas
--
You will probably marry after a very brief courtship.
More information about the PyQt
mailing list