John Burnett <pyt...@johnburnett.com> 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 try and open a
file called "file", which fails, and pipes the resulting error ("'file'
is not recognized as an internal or external command, operable program
or batch file.") to a file named "null" in my "c:\dev" directory.

This will happen on any system that doesn't /dev/null.  _syscmd_uname
does the same thing, but "protects" against it by testing for platform
type.  I'm not familiar enough with the supported platforms to know if
it's covering all the bases, but a safer thing to do would be to just
use os.devnull anyway.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6479>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to