I was wondering why you weren't using the Time class out of the datetime module. It correctly handles a lot of what you are doing manually right now.
Schol-R-LEA
Veteran Poster
1,020 posts since Oct 2010
Reputation Points: 414
Solved Threads: 163
Skill Endorsements: 10
You should send the time value entered to the class, so this statement should be in a function that is called when the "Convert" button is pressed
conv = Converter(5)
and should send the value from the Entry instead of "5" (links to using get to read an entry and callbacks for a button click
Next the class uses "n" which it doesn't have access to
ampm = n[-1]
You should be using "x" or even better self.x
The "Elapsed Minutes Since Midnight" should actually show something which requires a Tkinter variable
Finally you should allow for 2:2P instead of 02:02P which means you should split on the colon instead of the [0:2] and [3:5] slices
woooee
Posting Maven
2,703 posts since Dec 2006
Reputation Points: 827
Solved Threads: 779
Skill Endorsements: 9