[PyQt] QProcess problems/question

Gustavo A. Díaz gustavo.diaz at gmail.com
Tue Jun 17 20:44:24 BST 2008


Yeah well, i am still newbie here... so...

Thanks for the Tip...

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

> On 17.06.08 15:52:02, Gustavo A. Díaz wrote:
> > But the command is not being executed since i still have the export of
> the
> > proxy variables empty.
> > What i am doing wrong here?
>
> You don't understand how processes and environment variables work.
> QProcess forks a new child process to execute the command you give it.
> Problem one: "export ..." is not a command, its a shell builtin function
> (bash probably) and thus won't do anything on its own. So you'd at least
> need to use something like "bash -c 'export ...'" as command. Next
> problem is that "export" only works in the shell and any shells that are
> started from the shell its been executed in. It doesn't have any
> influence on any other shell running on your machine and thus doesn't
> have any influence on any other process that you execute via QProcess or
> anywhere else in your system. If you want to start an application that
> uses these variables, you should start the application via QProcess and
> use QProcess' functions to set the environment variables (IIRC
> setEnvironment()). Thats the only way to do this.
>
> Andreas
>
> --
> Exercise caution in your daily affairs.
> _______________________________________________
> 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/20080617/a82d15f7/attachment-0001.html


More information about the PyQt mailing list