I'm working with a python script (let's call it MyScript.py) containing a function with many parameters of various types, which I'm not allowed to modify:
def MyFunction(str1, int1, str2, str3, int2, bool1):
#Do something with input
if __name__ == "__main__":
eval(sys.argv[1])
And I want to call this function from a batch script with a list of parameters. I tried the ways below but it failed:
python -c "import MyScript;MyScript.MyFunction('str1', 'int1', 'str2', 'str3', 'int2', 'bool1')"
python -c "import MyScript;MyScript.MyFunction([str1], [int1], [str2], [str3], [int2], [bool1])"
How should I call this function then? And what's the correct way to format the input parameters to a python script? Thank you!