Patches item #1559298, was opened at 2006-09-15 14:59 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1559298&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Windows Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Martin v. Löwis (loewis) Assigned to: Nobody/Anonymous (nobody) Summary: test_popen fails on Windows if installed to "Program Files" Initial Comment: test_popen fails in 2.5c2. The reason is that popen invokes cmd.exe /c "c:\program files\python25\python.exe" -c "import sys;print sys.argv" cmd.exe does not support that syntax, and gives an error (which silently disappears); the pipe read then returns an empty string. This problem exists atleast since Python 2.3. To fix this, cmd.exe needs to be invoked as cmd.exe /c "c:\program files\python25\python.exe" -c "import sys;print sys.argv" The attached patch fixes this by always wrapping the command line with an addition pair of quotes. It's not clear to me whether this can go into 2.5.1: an application may already work around this problem by passing extra quotes to popen, which would then break if popen adds even more quotes. ---------------------------------------------------------------------- >Comment By: Martin v. Löwis (loewis) Date: 2007-03-14 20:50 Message: Logged In: YES user_id=21627 Originator: YES Indeed, this should read cmd.exe /c ""c:\program files\python25\python.exe" -c "import sys;print sys.argv"" ---------------------------------------------------------------------- Comment By: Georg Brandl (gbrandl) Date: 2007-03-13 10:39 Message: Logged In: YES user_id=849994 Originator: NO I don't see a difference between your two command lines here... did you mean to add additional quotes in the second example? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1559298&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches