shlex.split != shlex.shlex get_token til eof

p.lavarre at ieee.org p.lavarre at ieee.org
Fri Sep 22 18:19:22 EDT 2006


> shlex.split gives me what I want ...
> every doc'ed instantiation of shlex.shlex ... gives me something else ...

Aye, the discrepancies are gross & legion - presumably astonishing only
newbies like me.

Here's a more dramatic example:

>>> import shlex
>>> shlex.split("//./PhysicalDrive9 //./Cdrom9 //./Tape9 //./A:")[0]
'//./PhysicalDrive9'
>>> shlex.shlex("//./PhysicalDrive9 //./Cdrom9 //./Tape9 //./A:", "", True).get_token()
'/'
>>>




More information about the Python-list mailing list