Python Forum
[Tkinter] I don't think I understand the basics of tkinter!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] I don't think I understand the basics of tkinter!
#7
(Apr-08-2019, 08:53 PM)joe_momma Wrote: Knowledge is acquired bit by byte. I've read through your posts. I suggest Mark Lutz's book learning python(no tkinter in it), then his book programming python(lots of tkinter examples and explanations). Mark has an example of a photo edit gallery all in tkinter (pyphoto). Or john grayson's tkinter programming, super old but still relevant.
I found an easier way and I finished the work early. I just dumped any attempt to create multiple windows or worry about the other issues and simply used a main program with no tkinter opening multiple python tkinter programs, each of which controls a specific line of output on the screen. Some (like lines output) are persistent. Others, like data provided by the user, are constantly changing. I simply provide all the data in arguments to a Popen then, to update, I kill the appropriate process and restart it with the new data. I also figured out how to send multiple graphics next to one another. Simple! I found a font that contains the few graphics characters I need, then Popen the program with the font and text I want (widget position, text, font, font size and fg/bg colors are all passed parameters) and it outputs graphics perfectly lined up. I use signals to kill appropriate program (4 output & 4 user data) then create a new one.

That's the difference between being an engineer and a software developer. It's done; it works; It's flexible; it's inelegant (so what!); it is inefficient (a quad core Raspberry Pi with nothing else to do means "so what #2").

Thanks for everyone's help. Without it, I wouldn't have thought "Why do I need to do these things?" and would have learned OOP, Python and Tkinter over the next six months but then I'd have missed my deadline. Finished a month early. But the code would have been a lot nicer and I would have learned something I won't. Then again, at my age and my ability these days to retain information, there would be no guarantee I wouldn't be asking the same questions again.

I'm not being sarcastic. Just practical. And in my 8 discussions I have learned a lot and sped up the process considerably.
Reply


Messages In This Thread
RE: I don't think I understand the basics of tkinter! - by jpezz - Apr-15-2019, 02:41 PM

Forum Jump:

User Panel Messages

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