New submission from sorin <sorin.sbar...@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://stackoverflow.com/questions/682799/what-to-do-with-the-input-line-is-too-long-error-message/3583282#3583282
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.

----------
components: Windows
messages: 115062
nosy: sorin
priority: normal
severity: normal
status: open
title: invalid call of Windows API _popen() generating The input line is too 
long error message
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9699>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to