On 28/8/2013 04:01, Kurt Mueller wrote:
> Because I cannot switch to Python 3 for now my life is not so easy:-) > > For some text manipulation tasks I need a template to split lines > from stdin into a list of strings the way shlex.split() does it. > The encoding of the input can vary. > For further processing in Python I need the list of strings to be in unicode. > According to: http://docs.python.org/2/library/shlex.html """Prior to Python 2.7.3, this module did not support Unicode input""" I take that to mean that if you upgrade to Python 2.7.3, 2.7.4, or 2.7.5, you'll have Unicode support. Presumably that would mean you could decode the string before calling shlex.split(). -- DaveA -- http://mail.python.org/mailman/listinfo/python-list