Hey guys,
New to writing Python and would like some advice on structure.
I am defining a bunch of variables at the start of my script. These are useful in various definitions that follow - hence trying to do them at the top is handy - however there is a problem I foresee.
These variables are defined at the import or load of the py. They relate to the current file and it’s path, contents of the scene, etc. If I build a IU and import that .py, and start doing work, it is quite likely that the variables will not be relevant for very long - and will need redoing. Refreshing them with each definition defeats the attempt of repeatedly creating the variables. I had considered that each defination refreshes via reload the entire .py but that all feels hacky. I feel like neither is proper and as I am still with basics, don’t know if I have yet to learn the correct method or if I’m just being dumb.
Advice on how I should sort my scripts?
Cheers,
Ollie