Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Splitting a line while keeping quoted items together

Thread Tools

Re: Splitting a line while keeping quoted items together

Tim Chase
Posts: n/a
>> Use the "shlex" module in the std lib?
> Well color me ignorant.
> Works cleanly. I shouldn't have reinvented the wheel.

I've experienced this enough: the csv module, option parsing,
config-file parsing, logging, timeit, and pwd all come to mind as
code I've written before realizing the stdlib already has it. Now,
if my task sounds remotely like something that somebody else might
have implemented already, my first stop is always to browse through
the stdlib docs. Then try to see if
somebody else has already solved the problem without the solution
getting into the stdlib. Only then do I proceed to trying to code
up something of my own.


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Splitting a line while keeping quoted items together Python 1 11-20-2012 01:09 AM
Re: Splitting text at whitespace but keeping the whitespace in thereturned list MRAB Python 3 01-26-2010 11:36 PM
Problem while splitting the line using a delimiter and pushing itinto an array Prasanth C++ 4 11-22-2008 05:10 AM
Splitting string into array keeping delimiters Gary C40 Ruby 6 12-16-2007 10:46 AM
Splitting a quoted string. mosscliffe Python 5 05-16-2007 01:13 PM