I am a mechanical student and I am building physical modeling with PyODE.
instead of running everything from a single file, I wanted to organize the material in modules, so I had:
- main.py
- callback.py
- helper.py
I ran into problems when I realized that helper.py is needed to reference variables from main, but main was the only import helper!
so my solution was to create a 4th file that contains variables and only imports external modules (such as time and random).
so now i have:
- main.py
- callback.py
- helper.py
- parameters.py
and all scripts have: import parametersand use: parameters.fooor parameters.bar.
Is this an acceptable practice or is it a reliable way to make python programmers intimidating? :)
, , , !
,
-Leav