On 16-06-14 12:06, Chris Angelico wrote: > def shell_split(cmd): > return subprocess.check_output("""python -c 'import sys; > print("\\0".join(sys.argv[1:]))' """+cmd,shell=True)[:-1].split("\0")
Nice idea, unfortunatly it doesn't work in python3.3 >>> shell_split("ls *.py") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 3, in shell_split TypeError: Type str doesn't support the buffer API >>> -- https://mail.python.org/mailman/listinfo/python-list