Quote aware split

obaudys at gmail.com obaudys at gmail.com
Wed May 16 19:33:02 EDT 2007


On May 16, 8:51 pm, "BJörn Lindqvist" <bjou... at gmail.com> wrote:
> How is the code different from shlex.split?

Shlex only splits by whitespace.  I needed something to split out SQL
statements from a Postgresql dump, so the ideal way of doing that is
to split by semicolons.  However, postgresql function definitions have
semicolons inside single quoted blocks which I didnt want to split by.

--
Ondrej




More information about the Python-list mailing list