Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:

This difference between trunk and py3k would go down to this.

import os
os.popen(r'file e:\python-dev\py3k\PC\VC6\python_d.exe 2> /dev/null')

trunk prints nothing, but py3k prints that message.

I don't know which is popen's correct behavior, we can supress this
message by using subprocess.Popen instead.

Index: Lib/platform.py
===================================================================
--- Lib/platform.py     (revision 66090)
+++ Lib/platform.py     (working copy)
@@ -110,7 +110,7 @@

 __version__ = '1.0.6'

-import sys, os, re
+import sys, os, re, subprocess

 ### Platform specific APIs

@@ -942,7 +942,7 @@
     """
     target = _follow_symlinks(target)
     try:
-        f = os.popen('file %s 2> /dev/null' % target)
+        f = subprocess.Popen('file %s 2> /dev/null' % target,
stdout=subprocess
.PIPE, stderr=subprocess.PIPE).stdout
     except (AttributeError,os.error):
         return default
     output = f.read().strip()

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3748>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to