Python 2.6/Windows: shlex.split() does not support unicode
strings. Is this simply a limitation of the current shlex
implementation or is this an intentional design decision that
reflects the behavior of how the Windows shell supports unicode
values?

Specifically, it doesn't appear that subprocess.Popen() has any
restrictions on unicode args, but perhaps I'm missing some edge
cases where this may be true?

If this is simply a limitation of the current shlex
implementation, does anyone see any risks to encoding a command
string using 'xmlreplace' ( command.encode( 'utf8', 'xmlreplace'
) ) in order to hide unicode chars, splitting the now ASCII
string using shlex.split, and then walking the list of strings
returned by shlex.split, decoding them back to Unicode ( .decode(
'utf8' ) ) before passing this list to subprocess.Popen() for
execution?

Thanks,
Malcolm
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to