[Scons-dev] Strange behavior of env.Execute(python script) on Windows

Alexandre Feblot alexandre at feblot.fr
Wed Mar 5 10:31:53 EST 2014


Hi,
Would any of you have an idea on the behavior of printpath.py in the small
test below? What happens to the PATH? Other variables are transfered
properly. The similar perl test shows the PATH as expected.

Sconstruct:
env = Environment()
env['ENV']['PATH'] += ';C:\\XXXXXXXXXXXXXXXXXXXXXX'
env.Execute(File('#/printpath.py').abspath)
env.Execute(File('#/printpath.pl').abspath)

printpath.pl:
#!/usr/bin/perl
print "$ENV{PATH}\n";

printpath.py:
#!/usr/bin/python
import os
print os.environ['PATH']

On windows (server 2008R2), with python 2.7.2, the result is:
scons: Reading SConscript files ...
C:\bug\printpath.py
C:\Python27\
C:\bug\printpath.pl
c:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\BIN\amd64;c:\Windows\Microsoft.NET\Framework64\v3.5;c:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft
.NET Framework 3.5 (Pre-Release
Version);c:\Windows\Microsoft.NET\Framework64\v2.0.50727;c:\Program Files
(x86)\Microsoft Visual Studio 9.0\VC\VCPackages;c:\Program Files
(x86)\Microsoft Visual Studio 9.0\Common7\IDE;c:\Program Files
(x86)\Microsoft Visual Studio 9.0\Common7\Tools;c:\Program Files
(x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program
Files\Microsoft SDKs\Windows\v6.0A\bin\x64;C:\Program Files\Microsoft
SDKs\Windows\v6.0A\bin\win64\x64;C:\Program Files\Microsoft
SDKs\Windows\v6.0A\bin;C:\Windows\System32;C:\XXXXXXXXXXXXXXXXXXXXXX
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20140305/5f29a788/attachment.htm>


More information about the Scons-dev mailing list