Should be `command = data.split(sep=None, maxsplit=1)[0]` or `command = data.split(None, 1)[0]`