Python Forum
How to compile all relevant code and then execute the program - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: How to compile all relevant code and then execute the program (/thread-20044.html)



How to compile all relevant code and then execute the program - Mocap - Jul-25-2019

I'm creating a program that will require using buttons to travel to different menus, but I'm not sure if I would put all of this code in one file or if I would create each component as a separate file or folder. Any idea on how I'd go about this?


RE: How to compile all relevant code and then execute the program - metulburr - Jul-25-2019

Usually beginners tend to put their code in one file, and as they learn the reason for organization, expand their latest codings to multiple modules, classes, etc.


RE: How to compile all relevant code and then execute the program - nilamo - Jul-26-2019

There is no requirement to use multiple files if you don't want to, so do what makes sense to you. Other languages (such as Java) force you to use different files, so your preference likely depends on your background.