Python Forum
Python Calculator Application
Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Calculator Application
#7
(Jul-21-2017, 07:08 PM)nilamo Wrote: Most programs are written so that they're actually libraries.  A "main" function is an entry point if you try to run the program directly, which then calls the libraries functions.
Structuring it this way makes it easy to do a lot of things, such as share your code with someone else (they can just "import" your code and call some functions, without your program starting to do it's things), or for testing.

If the "main" function is being called more than once, it's normally a red flag that something's a little fishy with the code.

Thanks!
Reply


Messages In This Thread
Python Calculator Application - by MemeStealer - Jul-21-2017, 04:23 PM
RE: Python Calculator Application - by snippsat - Jul-21-2017, 06:03 PM
RE: Python Calculator Application - by MemeStealer - Jul-21-2017, 07:08 PM
RE: Python Calculator Application - by MemeStealer - Jul-21-2017, 07:12 PM
RE: Python Calculator Application - by nilamo - Jul-21-2017, 06:36 PM
RE: Python Calculator Application - by nilamo - Jul-21-2017, 07:08 PM
RE: Python Calculator Application - by MemeStealer - Jul-21-2017, 08:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need some help trying to get my Python mortgage amortization calculator to work prope IamSirAskAlot 4 17,269 Feb-12-2024, 10:53 PM
Last Post: BerniceBerger
  Python running only in application Mawixy 2 1,781 Apr-19-2022, 11:38 AM
Last Post: Mawixy
  New to python, trying to make a basic calculator AthertonH 2 1,835 Apr-14-2022, 03:33 PM
Last Post: AthertonH
  How To Create A "Birthday Calculator" in Python? unigueco9 3 6,461 Oct-11-2021, 08:03 PM
Last Post: SamHobbs
  How to send data from a python application to an external application aditya_rajiv 1 2,981 Jul-26-2021, 06:00 AM
Last Post: ndc85430
  python calculator only using decomposing functions kirt6405 1 2,374 Jun-19-2021, 12:52 AM
Last Post: bowlofred
  python application and credentials safety concern aster 4 4,552 Mar-06-2021, 06:51 PM
Last Post: snippsat
  Keep Application running after Python script ends PEGylated_User 0 2,633 Nov-12-2020, 03:27 PM
Last Post: PEGylated_User
  Installing Python Application pplgf 3 3,373 Apr-27-2020, 10:51 PM
Last Post: Larz60+
  loop in pyautogui (python automation GUI application) pyprogrammer 0 5,505 Feb-12-2020, 02:52 PM
Last Post: pyprogrammer

Forum Jump:

User Panel Messages

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