One step up from str.split()

Joel Koltner zapwireDASHgroups at
Wed Jul 16 01:28:54 CEST 2008

"Sion Arrowsmith" <siona at> wrote in message 
news:Tiv*wYYhs at
> What's wrong with sys.argv ?

Mainly that it doesn't exist.  :-)  The example was slightly contrived -- I'm 
really dealing with commands interactively entered within a program in 
response to raw_input(), although the format of the commands is meant to be 
consistent with command-line usage.  (A real command, for instance, would be 
something like this: load "my firmware file.bin" .)

I ended up using shlex.strip() -- works great!


More information about the Python-list mailing list