In my program, I do the following operation:
import sys
qtd_ponts = int(sys.argv[1])
I would like to know a practical way to run this .py file by passing arguments without needing an IDE, for example .bat files.
In my program, I do the following operation:
import sys
qtd_ponts = int(sys.argv[1])
I would like to know a practical way to run this .py file by passing arguments without needing an IDE, for example .bat files.
To run a script as bat or directly from the console, just put the following command:
python arquivo.py [arg1 arg2 ...]
Remember that in the case of Windows, the folder where python is installed must be in the environment variable (path).