Shlex currently has no way to escape quoting characters within strings. This fixes that. No test is provided, but I'll be willing to write a test module to test this and the other basic behavior of the shlex module.
Logged In: YES user_id=7887 Jeremy, shlex.py has been extended to support posix-mode parsing in 2.3. This should include support for escapings and other goodies, similar to shells. Thanks for the patch!