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