Re: shlex.split != shlex.shlex get_token til eof

2006-09-26 Thread p . lavarre
Correspondingly, to the Faq Wiki I added: /// http://pyfaq.infogami.com/installed-index Q: Where is Python installed on my machine? A: Binaries in bin/, source in lib/, doc somewhere else. Read the module source when you find its doc incomplete. On Linux, ... On the Mac, straight from Apple: /

Re: shlex.split != shlex.shlex get_token til eof

2006-09-26 Thread p . lavarre
Kindly offline the answer is: (a) Python installation usually includes source, and thus (b) UTSL: $ pwd C:\Python25\Lib\shlex.py $ ... $ pwd /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 $ grep -A 5 "def split" shlex.py def split(s, comments=False): lex = shlex(s, posix=True

Re: shlex.split != shlex.shlex get_token til eof

2006-09-25 Thread p . lavarre
> 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

Re: shlex.split != shlex.shlex get_token til eof

2006-09-22 Thread p . lavarre
> 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 //./Cdr

shlex.split != shlex.shlex get_token til eof

2006-09-22 Thread p . lavarre
How can I instantiate shlex.shlex to behave like shlex.split does? I see shlex.split gives me what I want: import shlex print shlex.split("1.2e+3")[0] # 1.2e+3 But every doc'ed instantiation of shlex.shlex surprisingly gives me something else: s1 = shlex.shlex("1.2e+3", None, False) pr