problem with os.system command length

Discussion in 'Python' started by jon c, Feb 10, 2004.

  1. jon c

    jon c Guest

    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
    jon c, Feb 10, 2004
    #1
    1. Advertising

  2. "jon c" <> 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
    Thomas Heller, Feb 10, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mitchua
    Replies:
    5
    Views:
    2,730
    Eric J. Roode
    Jul 17, 2003
  2. =?Utf-8?B?SG96aQ==?=
    Replies:
    1
    Views:
    6,952
    Ken Cox [Microsoft MVP]
    Jun 2, 2004
  3. Sam
    Replies:
    3
    Views:
    14,091
    Karl Seguin
    Feb 17, 2005
  4. Replies:
    2
    Views:
    5,921
  5. Dan Manes
    Replies:
    1
    Views:
    729
    David Browne
    Apr 23, 2006
Loading...

Share This Page