[PyQt] QProcess problems/question

Gustavo A. Díaz gustavo.diaz at gmail.com
Wed Jun 18 01:11:23 BST 2008


Ok Thanks, this is a start. Now is more clear.
I will do some test tonite.

The idea is, an application (small) to set the global enviroment proxy (as
we could do in bash with export bla bla:8080) but with a GUI, which i've
added XML support and a systray.
This is the actual look to have an idea:
http://img515.imageshack.us/content.php?page=done&l=img515/9710/qproxysettingsrd9.png

Cheers.

2008/6/17 Andreas Pakulat <apaku at gmx.de>:

> 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.
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Gustavo A. Díaz
GDNet Projects
www.gdnet.com.ar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080618/7da74b7d/attachment-0001.html


More information about the PyQt mailing list