0

I have a python program. The program is written such that it uses all the python modules present from the beginning of execution.

I have two terminal windows open: in the first window I can edit the code and do short test runs, and in the second window I run the same program (modules of which are added to the PYTHONPATH) with such parameters that it runs for several hours.

Question: is it safe to start the execution in the second window, and then to switch to the first window and modify the code and do some short test runs? I start to modify some time after the beginning of the execution in the second window. Also, is it safe to switch git branches in such situation?

Dmitry Kabanov
  • 710
  • 1
  • 7
  • 20
  • 1
    Yes. Python compiles your code before it interprets it, you're fine (http://stackoverflow.com/questions/19916729/how-exactly-is-python-bytecode-run-in-cpython ). As long as you're not doing dynamic source code compilation of any kind, which I think you'd know if you were – en_Knight Dec 22 '15 at 21:59
  • 1
    http://stackoverflow.com/questions/25189859/how-does-python-read-and-interpret-source-files – Martin Konecny Dec 22 '15 at 22:03

0 Answers0