Use shlex.split() instead of str.split().