Python shlex.py() Examples
The following are 1
code examples of shlex.py().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
shlex
, or try the search function
.
Example #1
Source File: test_shlex.py From android_universal with MIT License | 5 votes |
def testSyntaxSplitCustom(self): """Test handling of syntax splitting with custom chars""" ref = ['~/a', '&', '&', 'b-c', '--color=auto', '||', 'd', '*.py?'] ss = "~/a && b-c --color=auto || d *.py?" s = shlex.shlex(ss, punctuation_chars="|") result = list(s) self.assertEqual(ref, result, "While splitting '%s'" % ss)