New submission from Andrey Morozov <andrey.moro...@itseez.com>: 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 [] ---------- files: run_me.py messages: 148792 nosy: Andrey.Morozov priority: normal severity: normal status: open title: critical error with import tempfile type: crash versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23838/run_me.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13524> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com