def _extract_command_with_args(cmd):
def _isint(value):<EOL><INDENT>try:<EOL><INDENT>int(value)<EOL>return True<EOL><DEDENT>except ValueError:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>equal_sign = cmd.find('<STR_LIT:=>')<EOL>if equal_sign == -<NUM_LIT:1>:<EOL><INDENT>return cmd, []<EOL><DEDENT>command = cmd[<NUM_LIT:0>:equal_sign]<EOL>args = cmd[equal_sign+<NUM_LIT:1>:].split('<STR_LIT:U+002C>')<EOL>converted = [x if not _isint(x) else int(x) for x in args]<EOL>return command, converted<EOL>
Parse input command with arguments.

    Parses the input command in such a way that the user may
    provide additional argument to the command. The format used is this:
      command=arg1,arg2,arg3,...
    all the additional arguments are passed as arguments to the target
    method.