Sean Carolan wrote:
[...]
YOU don't know about me without you have read a book by the name of The

How can I get shlex.split to ignore single apostrophes such as the one above?


>>> shlex.split("The Doctor's bow ties are cool, and Amy's uniform is hot.")
['The', 'Doctors bow ties are cool, and Amys', 'uniform', 'is', 'hot.']
>>>
>>> shlex.split("The Doctor's bow ties are cool, and Amy's uniform is hot.", posix=False) ['The', "Doctor's", 'bow', 'ties', 'are', 'cool,', 'and', "Amy's", 'uniform', 'is', 'hot.']


Fans of Doctor Who will know exactly what I'm talking about...



--
Steven

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to