> I see shlex.split gives me what I want ... > shlex.shlex surprisingly gives me something else ... > I can get closer ... by hacking ... > .wordchars += ".+-"
Kindly offline I was told, Try patching .whitespace_split = True instead. Compare: shlex.split("//./PhysicalDrive9 //./Cdrom9 //./Tape9 //./A:") lex = shlex.shlex("//./PhysicalDrive9 //./Cdrom9 //./Tape9 //./A:") lex.whitespace_split = True list(lex) Why and how often this patch makes shlex.shlex and shlex.split agree, I still don't know - but for these specific examples, it works. -- http://mail.python.org/mailman/listinfo/python-list