Split the string *s* using shell-like syntax.
(s, comments=False, posix=True)
| 302 | return token |
| 303 | |
| 304 | def split(s, comments=False, posix=True): |
| 305 | """Split the string *s* using shell-like syntax.""" |
| 306 | if s is None: |
| 307 | raise ValueError("s argument must not be None") |
| 308 | lex = shlex(s, posix=posix) |
| 309 | lex.whitespace_split = True |
| 310 | if not comments: |
| 311 | lex.commenters = '' |
| 312 | return list(lex) |
| 313 | |
| 314 | |
| 315 | def join(split_command): |