[New-bugs-announce] [issue1300] subprocess.list2cmdline doesn't do pipe symbols

Andrew Moise report at bugs.python.org
Thu Oct 18 19:40:54 CEST 2007

New submission from Andrew Moise:

I expected subprocess.list2cmdline() to convert my list of arguments
into a command line which results in behavior equivalent to the Unix
exec() functions -- that is, that I can safely pass arbitrary characters
to it and it'll make it such that those characters are escaped.  It
looks to me, though, like it doesn't handle the pipe symbol, so that if
I call list2cmdline(['echo', 'foo|bar']), I get the command line 'echo
foo|bar' instead of 'echo "foo|bar"' as I would expect.

If this is actually a result of my misunderstanding (or if it's fixed in
a more recent version), please accept my apologies.

components: Windows
messages: 56534
nosy: chops at demiurgestudios.com
severity: normal
status: open
title: subprocess.list2cmdline doesn't do pipe symbols
type: behavior
versions: Python 2.5

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list