equal
deleted
inserted
replaced
335 Python 3 compatibility as shelx.split() don't accept bytes on Python 3. |
335 Python 3 compatibility as shelx.split() don't accept bytes on Python 3. |
336 """ |
336 """ |
337 ret = shlex.split(s.decode('latin-1'), comments, posix) |
337 ret = shlex.split(s.decode('latin-1'), comments, posix) |
338 return [a.encode('latin-1') for a in ret] |
338 return [a.encode('latin-1') for a in ret] |
339 |
339 |
340 shlexquote = shlex.quote |
|
341 |
340 |
342 else: |
341 else: |
343 import cStringIO |
342 import cStringIO |
344 import pipes |
|
345 |
343 |
346 xrange = xrange |
344 xrange = xrange |
347 unicode = unicode |
345 unicode = unicode |
348 bytechr = chr |
346 bytechr = chr |
349 byterepr = repr |
347 byterepr = repr |
406 if getattr(sys, 'argv', None) is not None: |
404 if getattr(sys, 'argv', None) is not None: |
407 sysargv = sys.argv |
405 sysargv = sys.argv |
408 sysplatform = sys.platform |
406 sysplatform = sys.platform |
409 sysexecutable = sys.executable |
407 sysexecutable = sys.executable |
410 shlexsplit = shlex.split |
408 shlexsplit = shlex.split |
411 shlexquote = pipes.quote |
|
412 bytesio = cStringIO.StringIO |
409 bytesio = cStringIO.StringIO |
413 stringio = bytesio |
410 stringio = bytesio |
414 maplist = map |
411 maplist = map |
415 rangelist = range |
412 rangelist = range |
416 ziplist = zip |
413 ziplist = zip |