Hi,
I’m trying to read command line arguments using the following code
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('vrscene', help='VRay Scene to process')
command_line_args = parser.parse_args()
print (command_line_args)
But i get a python error anytime I add anything at the end of the script invocation through the output log i.e ‘py myscript.py’ . If i try to execute ‘py myscript.py --vrscene test’ or ‘py myscript.py anytext’ i get a string error. Seems like its not accepting anything after the name of the script.
My end goal is to be able to supply command line args through command line invocation i.e 'UE4Editor-Cmd.exe myproject.uproject ExecutePythonScript=“myscript.py --vrscene test”
How can I do this ?
Thanks,