[issue13524] critical error with import tempfile

2011-12-06 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13524 ___

[issue13524] critical error with import tempfile

2011-12-04 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: OK, the long and short is that spwaning a process without passing in SystemRoot is asking for trouble. There's a blog post here which gives an example:

[issue13524] critical error with import tempfile

2011-12-03 Thread Andrey Morozov
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

[issue13524] critical error with import tempfile

2011-12-03 Thread Andrey Morozov
Andrey Morozov andrey.moro...@itseez.com added the comment: WIDW ? -- Added file: http://bugs.python.org/file23839/test1.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13524 ___

[issue13524] critical error with import tempfile

2011-12-03 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: The environment passed to a Windows process must contain certain things. (I don't at this moment remember exactly what). You can't just pass the one thing you're adding. Change your e = ... line to something like: e = os.environ

[issue13524] critical error with import tempfile

2011-12-03 Thread Andrey Morozov
Andrey Morozov andrey.moro...@itseez.com added the comment: it fix my problem: e = os.environ.copy() e['PATH_TO_MY_APPS'] = path/to/my/apps p = subprocess.Popen(sys.executable + test1.py 123, env=e, shell=True, stdout=subprocess.PIPE) answer: need have copy of environments --

[issue13524] critical error with import tempfile

2011-12-03 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Re-opening because there's a real problem here which can crash Python hard. Simplest reproduction: import sys import subprocess subprocess.Popen (sys.executable, env={}) Affects 2.x and 3.x tip (haven't tried others yet but I don't imagine

[issue13524] critical error with import tempfile

2011-12-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Re-opening because there's a real problem here which can crash Python hard. Works under Linux. Is it Windows-specific? -- nosy: +pitrou stage: test needed - versions: -Python 3.1 ___ Python

[issue13524] critical error with import tempfile

2011-12-03 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Yes. I've added the Windows component on the tracker. (At least I think I have). It's to do with CreateProcess needing at least certain items in the environment passed. I'm trying to track down some docs on MSDN which specify which must be