problem with os.system command length

J

jon c

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?

cheers, Jon

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends
http://www.msn.co.uk/messenger
 
T

Thomas Heller

jon c said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top