I use and maintain a python script that automates the analysis of the compilation, execution, and performance of some specific applications. The script was quite simple when I created it (it provided only a compilation option), but now it is very large (2100 lines, not optimized, I agree), quite complex and providing many different command line options (managing arguments with argparse is a nightmare, and I'm not able to do what I need for sure)
To simplify this, I plan to break it into several scripts:
- compile.py
- run.py
- analyse.py
These three scripts will need to have access to common functions, classes, and constants. Regarding this limitation, my question is, what is the pyhtonic way to handle this?
source share