[issue13524] critical error with import tempfile

2011-12-06 Thread Tim Golden
Changes by Tim Golden : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue13524] critical error with import tempfile

2011-12-05 Thread Tim Golden
Tim Golden added the comment: After a discussion on python-dev: http://mail.python.org/pipermail/python-dev/2011-December/114733.html I propose to close this call tomorrow as wontfix -- ___ Python tracker ___

[issue13524] critical error with import tempfile

2011-12-04 Thread Tim Golden
Tim Golden 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: http://jpassing.com/2009/12/28/the-hidden-danger-of-forgetting-to-specify-systemroot-in-a-custom-environment-bloc

[issue13524] critical error with import tempfile

2011-12-03 Thread Tim Golden
Tim Golden 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 there. --

[issue13524] critical error with import tempfile

2011-12-03 Thread Antoine Pitrou
Antoine Pitrou 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 tracker

[issue13524] critical error with import tempfile

2011-12-03 Thread Tim Golden
Tim Golden 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 it's different)

[issue13524] critical error with import tempfile

2011-12-03 Thread Andrey Morozov
Andrey Morozov 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 -- status: open -> closed ___

[issue13524] critical error with import tempfile

2011-12-03 Thread Tim Golden
Tim Golden 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 e['PATH_TO_MY_CODE'] = '/x/y/z' a

[issue13524] critical error with import tempfile

2011-12-03 Thread Andrey Morozov
Andrey Morozov added the comment: WIDW ? -- Added file: http://bugs.python.org/file23839/test1.py ___ Python tracker ___ ___ Python-b

[issue13524] critical error with import tempfile

2011-12-03 Thread Andrey Morozov
New submission from Andrey Morozov : 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 temp