problem with os.system command length

Thomas Heller theller at python.net
Tue Feb 10 06:31:20 EST 2004


"jon c" <jon_couchman at hotmail.com> writes:

> I am using python 2.3
> windows 2000
>
> I try and run a very long command using os.system(cmd)
>
> but it is too long to be run, I get the following error
>
> the following character string is too long:
>
> although this is not directly a python problem, I was wondering if
> anyone knew a quick way of solving it?

The general solution is to write the command line arguments into a file,
and pass the filename to the program you want to call.  Not all programs
support this, though.

Thomas



More information about the Python-list mailing list