Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Program layout
#2
Every program is different. A common pattern is to have a main() function from which everything starts, and then invoke it at the end of your script like this:
if __name__ == "__main__":
    main()
Global variables are considered bad, and object-oriented programming is often important to the proposed solution.

Beyond that, I think you'd get the most out of this question by asking about specific circumstances.
Reply


Messages In This Thread
Program layout - by pfaber11 - May-12-2019, 07:42 PM
RE: Program layout - by micseydel - May-12-2019, 11:55 PM
RE: Program layout - by Yoriz - May-13-2019, 07:25 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020