thanks a lot for your article, this was exactly what i was looking for since this topic is skipped by basically everyone else...
You said that the topic with the import of app.py instead of using main.py is out of scope... Do you plan on writing up something that is picking this topic up?
I'm quite interested in the reasoning of this approach, do you have any reference by chance?
I don't think there are any formal guidelines on the topic, to be honest. My use of app.py has a lot to do with separation of concerns; I put my GUI startup code in app.py, and my non-GUI startup code in __main__.py. I can't really point to something that says this is "right" or "wrong"...it just works out pretty well for my project. It's something that has to be considered on a project-by-project basis, really.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
thanks a lot for your article, this was exactly what i was looking for since this topic is skipped by basically everyone else...
You said that the topic with the import of app.py instead of using main.py is out of scope... Do you plan on writing up something that is picking this topic up?
I'm quite interested in the reasoning of this approach, do you have any reference by chance?
I don't think there are any formal guidelines on the topic, to be honest. My use of
app.py
has a lot to do with separation of concerns; I put my GUI startup code inapp.py
, and my non-GUI startup code in__main__.py
. I can't really point to something that says this is "right" or "wrong"...it just works out pretty well for my project. It's something that has to be considered on a project-by-project basis, really.