[New-bugs-announce] [issue15073] commands.getoutput() is broken

Pavel Fedin report at bugs.python.org
Fri Jun 15 07:53:20 CEST 2012


New submission from Pavel Fedin <p.fedin at samsung.com>:

commands.getoutput() is broken on Windows. The issue has been detected in v2.7.2, but still persists in v2.7.3:
--- cut ---
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import commands;
>>> print commands.getoutput("dir");
'{' is not recognized as an internal or external command,
operable program or batch file.
>>>
--- cut ---
 The error message comes from cmd.exe. Looks like Python tries to feed native Windows shell with UNIX-style commands sequence in {...}.
 I believe this is very simple to fix, please take a look at it. Some our internal software croaks because of this.

----------
components: Windows
messages: 162844
nosy: p.fedin
priority: normal
severity: normal
status: open
title: commands.getoutput() is broken
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15073>
_______________________________________


More information about the New-bugs-announce mailing list