import platform
import shlex


def split_command_string(string):
    """Uses shlex.split() to split a string into a list according
    to the operating system
    """
    is_posix = platform.system() != 'Windows'
    return shlex.split(string, posix=is_posix)