En Mon, 17 Sep 2007 21:01:38 -0300, Chris Carlen  
<[EMAIL PROTECTED]> escribi�:

> I'm writing a Python program, a hex line editor, which takes in a line
> of input from the user such as:
>
>  >>> cmd = raw_input('-').split()
> -e 01 02 "abc def" 03 04
>  >>> cmd
> ['e', '01', '02', '"abc', 'def"', '03', '04']
>
> Trouble is, I don't want to split the quoted part where the space occurs.

For this, try using the shlex module  
<http://docs.python.org/lib/module-shlex.html>
The cmd module may be useful too, so you can concentrate on your own  
functions, not the framework: <http://docs.python.org/lib/module-cmd.html>

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to