[PyQt] How can I add a path to the QProcess PATH environment variable?
J Barchan
jnbarchan at gmail.com
Fri Nov 23 09:14:42 GMT 2018
On Fri, 23 Nov 2018 at 09:04, <kristof.mulier at telenet.be> wrote:
> Dear PyQt developers/users,
>
> I'm using a QProcess()-instance to execute commands. The QProcess()-instance
> automatically inherits the standard environment, for example the PATH
> environment variable. So if the command is an executable, it can only find
> it if it's in the PATH variable.
> Once the QProcess()-instance exists, I just can't add anything to its
> PATH variable. Well, actually I can, but it doesn't have any effect. I've
> explained everything in great details on StackOverflow:
>
>
> https://stackoverflow.com/questions/53438065/how-can-i-add-a-path-to-the-qprocess-path-environment-variable-pyqt5-on-python
>
> I would be very thankful if you can have a look at it :-)
>
> Kind greetings,
>
> Kristof Mulier
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
I have posted a comment at *SO*:
> I think you're misunderstanding. You are trying to affect the PATH
> environment which gets passed to the sub-process. What you *want* to do
> is simply alter the PATH environment in the *parent*, it is that which
> needs to find your executable before the sub-process can get spawned. And
> if you want to, then change your parent's PATH back *after* the
> sub-process has been spawned
>
--
Kindest,
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20181123/7c3df46a/attachment-0001.html>
More information about the PyQt
mailing list