To be specific, I want a Python script that accepts a string from the user and interprets that string as a command in the terminal. In other words, my script should be able to be used as follows:
python testScript.py "command -arg1 -arg2 -arg3"
And the output should be as follows:
command -arg1 -arg2 -arg3
which executes the command with 3 arguments: arg1, arg2, and arg3.
i.e.,
python testScript.py "ls -lah"
Outputs the permissions of the current directory.
Likewise,
python testScript.py "/testarea ls -lah"
Would output the permissions of the directory, "/testarea"
Any suggestions or modules?