[New-bugs-announce] [issue9699] invalid call of Windows API _popen() generating The input line is too long error message
report at bugs.python.org
Fri Aug 27 13:42:20 CEST 2010
New submission from sorin <sorin.sbarnea at gmail.com>:
Behavior: you get "The input line is too long." error message when you try to run an external process by using os.system(), subprocess.Popen() or other similar methods.
The real command line limit is 8192 under Windows and in most cases (if not all) the cause for getting this message is not the length.
The real cause is that if you even have a quote inside your command line you need to include the entire command in quote.
Here are some details:
http://msdn.microsoft.com/en-us/library/96ayss4b.aspx (see comment)
Even if this is caused by a bug on Windows that is present for more than ten years I think Python needs to workaround it by adding the quotes when they are needed.
This will prevent other developers from writing OS specific code in their Python programs in order to workaround this bug.
title: invalid call of Windows API _popen() generating The input line is too long error message
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce