Python Forum

Full Version: Long command with characters not working in Python on Oracle Linux 7
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm not asking for the code to shlex.split. As I said, that is not the source of the problem. The problem is in list2cmdline, so we need the code to list2cmdline in order to fix the problem.

I don't know why you removed shlex.split. It turns the string into a list, and list2cmdline is clearly expecting a list. When you give it the unprocessed string, it is breaking down the string into each individual character, instead of the lexical elements that shlex.split is giving you.
Pages: 1 2