By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,272 Members | 1,733 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,272 IT Pros & Developers. It's quick & easy.

problem with os.system command length

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"jon c" <jo**********@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
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.