I have tow python files. From file1.py
I want to call file2.py
but with parameterized.
Shell equivalent is: CALL file2.bat Input.txt
I tried using : os.system("file2.py Input.txt")
but this is opening the text file in notepad. I want this file taken as an input in file2.py
.
In file2.py
, I'm checking the passed parameter as: print(f"First Argument : {sys.argv[0]}")
What could the proper way to do this?