[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread John Burnett
John Burnett added the comment: You're right, Vista64 is returning "win32" for the platform. And ahh, I see what I did: in Python 2.5.2, _syscmd_file wasn't using a sys.platform check. Then when I looked at the current version, I saw it was still using "/dev/null", but didn't see a platform ch

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: John Burnett wrote: > John Burnett added the comment: > > I'm not sure how you're seeing that those functions bypass external > commands? Both functions use this bypass mechanism: if sys.platform in ('dos','win32','win16','os2'): return defau

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread John Burnett
John Burnett added the comment: I'm not sure how you're seeing that those functions bypass external commands? I'm running Vista64, and it certainly looks like calling platform.architecture calls _syscmd_file, which then immediately calls os.popen("file %s 2> /dev/null"). This causes windows to

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On which Windows platform would that be ? Both internal helper functions bypass using an external command for Windows and DOS platforms. -- ___ Python tracker

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> lemburg nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread John Burnett
New submission from John Burnett : The functions _syscmd_uname and _syscmd_file are hard-coded to pipe stderr to "/dev/null", as opposed to os.devnull. On Windows, this has the effect of creating a file called "null" to a local "dev" directory (if the directory exists). Attached is a fix. Whil