(command_line)
| 254 | |
| 255 | |
| 256 | def command_and_args_from_cmd(command_line): |
| 257 | args = '' |
| 258 | pos = command_line.find(' ') |
| 259 | if pos > 0: |
| 260 | cmd = command_line[:pos] |
| 261 | args = command_line[pos + 1:].strip() |
| 262 | else: |
| 263 | cmd = command_line.strip() |
| 264 | |
| 265 | return cmd, args |
| 266 | |
| 267 | |
| 268 | _DISALLOWED_COMMAND_CHARS = ('\r', '\n', '\x00') |