Split the string *s* using shell-like syntax.
(s, comments=False, posix=True)
| 303 | return token |
| 304 | |
| 305 | def split(s, comments=False, posix=True): |
| 306 | """Split the string *s* using shell-like syntax.""" |
| 307 | if s is None: |
| 308 | import warnings |
| 309 | warnings.warn("Passing None for 's' to shlex.split() is deprecated.", |
| 310 | DeprecationWarning, stacklevel=2) |
| 311 | lex = shlex(s, posix=posix) |
| 312 | lex.whitespace_split = True |
| 313 | if not comments: |
| 314 | lex.commenters = '' |
| 315 | return list(lex) |
| 316 | |
| 317 | |
| 318 | def join(split_command): |
no test coverage detected