Creating a gui around a python script using Tkinter

后端 未结 1 593
野性不改
野性不改 2021-01-27 06:17

I have an existing python script and I want to wrap it in a GUI. Since I already have tkinter installed I would like to use it if possible. At the moment my script has many pl

相关标签:
1条回答
  • 2021-01-27 06:44

    UI toolkits usually have an event-driven model where the main loop is in the toolkit itself. This is probably different from your current synchronous, interactive model (where the program just pauses while waiting for input)

    The best would be to try to refactor your program and factor-out the view part (look up the model-view-control design pattern). After that, it should be easy to replace your console oriented view with an tkInter based one.

    (that's as specific as I can get without a concrete question)

    0 讨论(0)
提交回复
热议问题