Skip to content Skip to sidebar Skip to footer

Executable Python File Sys Not Accepting '(' Character

I am trying to write a python file that takes command line input and performs some actions. The input will consist of a-z, [, ], ( and ). I made the following program just to check

Solution 1:

There's nothing the script can do about shell syntax when invoking the script. The shell parses the command line first. You have to escape or quote characters that have special meaning in the shell (which includes most punctuation characters):

./program qwerty \(abc\) '[hi]'

Post a Comment for "Executable Python File Sys Not Accepting '(' Character"