Jakub Wilk added the comment: Something like this should be safe: def mkarg(x): ' ' + pipes.quote(x) ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue22187> _______________________________________