Message148792
run_me.py:
import subprocess, sys
e = {'PATH_TO_MY_APPS' : "path/to/my/apps"}
p = subprocess.Popen(sys.executable + " test1.py 123", env=e, shell=True, stdout=subprocess.PIPE)
print(p.stdout.readlines())
p.wait()
test1.py:
1: import sys, os
2: #import tempfile
3: print("hello : " + sys.platform + " PATH: " + os.environ['PATH_TO_MY_APPS'])
System:
Python 2.7.2 x64, Windows x64 7 Pro + SP1
Problem:
if I run python run_me.py then I see on my stdout:
['hello : win32 PATH: path/to/my/apps\r\n']
but if I uncomment line number 2 in test1.py and run python run_me.py then I see on my stdout :
C:\tmp\python_test>python run_me.py
Traceback (most recent call last):
File "test1.py", line 2, in <module>
import tempfile
File "C:\Python27\lib\tempfile.py", line 34, in <module>
from random import Random as _Random
File "C:\Python27\lib\random.py", line 883, in <module>
_inst = Random()
File "C:\Python27\lib\random.py", line 97, in __init__
self.seed(x)
File "C:\Python27\lib\random.py", line 111, in seed
a = long(_hexlify(_urandom(16)), 16)
WindowsError: [Error -2146893818] Invalid Signature
[] |
|
Date |
User |
Action |
Args |
2011-12-03 12:20:23 | Andrey.Morozov | set | recipients:
+ Andrey.Morozov |
2011-12-03 12:20:23 | Andrey.Morozov | set | messageid: <1322914823.87.0.666849629429.issue13524@psf.upfronthosting.co.za> |
2011-12-03 12:20:23 | Andrey.Morozov | link | issue13524 messages |
2011-12-03 12:20:22 | Andrey.Morozov | create | |
|