[PyQt] How can I add a path to the QProcess PATH environment variable?
Kyle Altendorf
sda at fstab.net
Fri Nov 23 15:27:48 GMT 2018
Why not just specify the full path to execute? Setting PATH is for configuring other processes and being 'lazy' in a shell (reasonable lazy, not bad lazy).
Cheers,
-kyle
On November 23, 2018 4:14:42 AM EST, J Barchan <jnbarchan at gmail.com> wrote:
>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
>>
More information about the PyQt
mailing list