split string saving screened spaces

bonono at gmail.com bonono at gmail.com
Fri Dec 16 03:51:22 EST 2005


Sergey wrote:
> Which module to use to do such thing:
>
> "-a -b -c '1 2 3'" -> ["-a", "-b", "-c", "'1 2 3'"]
>
> (i have string, need to pass it to getopt)
seems like CSV except that the seperator is space. You may check to see
if the CSV module can take space as delimiter.




More information about the Python-list mailing list