0

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 places where it asks for user input using raw_input(). I would like to replace these with either a modal pop-up asking for user input or (preferably) an Entry object which responds to the enter key.

1
  • I have since found EasyGui is very easy to work with and relatively simple to get started with. If anyone is in a similar situation in the future they may want to try EasyGui. Commented Sep 4, 2010 at 5:55

1 Answer 1

2

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)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.