Georg Brandl <ge...@python.org> added the comment:

I'm attaching a patch that changes quote() logic.  It also fixes #7476, the 
empty argument case.

Strings with unsafe characters are now always quoted with single quotes. Single 
quotes themselves are replaced by a single quote in double quotes, so that

    te$t'quoting

becomes

    'te$t'"'"'quoting'

which I believe is portable across all commonly used shells.

(Another implementation would be to just backslash-quote all unsafe chars, but 
it makes for less readable results.)

Assigning to David for review -- you recently claimed to like shells :)

----------
assignee:  -> r.david.murray
nosy: +georg.brandl, r.david.murray

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7507>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to