I have a python script which takes various options from the command line
-runs with gui
python myscript.py -gui
-runs without requiring user prompts
python myscript.py -aut
-runs with input data taken from input.py
python myscript.py input.py
-and combinations of the above e.g. runs automatically taking input from input.py
python myscript.py -aut input.py
I would like to be able to call this from anywhere on my linux box. How can I do this? I have tried aliasing this in my .bashrc file, but using this method it is unable to accept any of the input options. I have also tried
but this only recognises the command if I type myscript, not python myscript . Typing just myscript obviously is unable to run the python script.
I have also tried writing a shell script which I could call.
#!/bin/bash #file: myscript.sh python '/path/to/folder/above_myscript/myscript.py'
However, again I am also unable to pass any options to it. What is the best solution to this problem?</div