Python Forum
Long command with characters not working in Python on Oracle Linux 7 - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Long command with characters not working in Python on Oracle Linux 7 (/thread-19871.html)

Pages: 1 2


RE: Long command with characters not working in Python on Oracle Linux 7 - ichabod801 - Jul-19-2019

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.