Will changes made to the Python script affect another run in the same file?

Suppose I run a Python script. Let them say that while working I open the source code and change the value of the variable to another value. Now, in another terminal, if I start using the latest source code, what happens to the previous run, is that progress?

Will this be affected due to this last change I made when I launched it?

The fact is that I want to execute parallel program runs for different values ​​of a specific variable. Any better way to do this?

+4
source share
2 answers

Python - -. , -. .

, , Python , , - . , , . .

, . sys.argv , , argparse - line. , .

+6

Python *.pyc. script , .

- argv

python your_script.py value

import sys
sys.argv[1] #this is the 'value' from the command line
+3

All Articles