Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Should the logic of a Python program be seperated from a GUI (like Tk or CTk)?
- 9876546789
-
81 posts
Should the logic of a Python program be seperated from a GUI (like Tk or CTk)?
I’m making a dB meter and an OpenAI based virtual assistant. Both have a GUI. Should they be seperated from the logic or should I keep them as is?
dB meter:
https://github.com/sserver224/DecibelMeter/blob/main/db_meter.py
Virtual assistant:
https://github.com/sserver224/OpenAI-Voice-Assistant/blob/main/openai_voice.py
dB meter:
https://github.com/sserver224/DecibelMeter/blob/main/db_meter.py
Virtual assistant:
https://github.com/sserver224/OpenAI-Voice-Assistant/blob/main/openai_voice.py
- bigspeedfpv
-
500+ posts
Should the logic of a Python program be seperated from a GUI (like Tk or CTk)?
yes they should be separated?
- Redstone1080
-
1000+ posts
Should the logic of a Python program be seperated from a GUI (like Tk or CTk)?
Oh I honestly don't bother. That's why I don't upload my code to github… 

- ajskateboarder
-
1000+ posts
Should the logic of a Python program be seperated from a GUI (like Tk or CTk)?
Obviously! You should seperate the logic into functions in a seperate module. You might even want to follow Python's packaging guide
Good luck trying to improve other people's code Oh I honestly don't bother. That's why I don't upload my code to github…
- Discussion Forums
- » Advanced Topics
-
» Should the logic of a Python program be seperated from a GUI (like Tk or CTk)?