(command_line)
| 238 | |
| 239 | |
| 240 | def command_and_args_from_cmd(command_line): |
| 241 | args = '' |
| 242 | pos = command_line.find(' ') |
| 243 | if pos > 0: |
| 244 | cmd = command_line[:pos] |
| 245 | args = command_line[pos + 1:].strip() |
| 246 | else: |
| 247 | cmd = command_line.strip() |
| 248 | |
| 249 | return cmd, args |
| 250 | |
| 251 | |
| 252 | _DISALLOWED_COMMAND_CHARS = ('\r', '\n', '\x00') |