This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author srid
Recipients srid
Date 2010-12-21.23:09:40
SpamBayes Score 4.07342e-05
Marked as misclassified No
Message-id <>
I noticed that despite ActivePerl being installed, `os.popen(...).close()` returned 1 (see find_working_perl in, while in actuality that command executed successfully with return code 0; I verified this by using the subprocess module.

Here's a patch:

--- python/PCbuild/
+++ python/PCbuild/
@@ -45,11 +45,11 @@
 # Being a Perl dummy, the simplest way I can check is if the "Win32" package
 # is available.
 def find_working_perl(perls):
+    import subprocess
     for perl in perls:
-        fh = os.popen('"%s" -e "use Win32;"' % perl)
-        rc = fh.close()
-        if rc:
+        try:
+            subprocess.check_call('"%s" -e "use Win32;"' % perl, shell=True)
+        except subprocess.CalledProcessError:
         return perl
     print("Can not find a suitable PERL:")
Date User Action Args
2010-12-21 23:09:42sridsetrecipients: + srid
2010-12-21 23:09:42sridsetmessageid: <>
2010-12-21 23:09:40sridlinkissue10752 messages
2010-12-21 23:09:40sridcreate