How can I call the custom-defined function in a python script from a bash shell?
I tried to use sys.argv[1], but not working properly.
for example,
import sys
if __name__=='__main__':
try:
func = sys.argv[1]
except: func = None
def function1():
~~~~~~~~
return a
def function2():
~~~~~~~~
return b
here, I want to call the function 1 or function 2 by typing like
$ script.py function1
$ script.py function2