If you want to build a simple desktop application with a GUI, is tkinter the standard weapon of choice?

(This is for classroom use, so simplicity of the code is more important than it being fast, powerful, or bulletproof.)

@peterdrake Depends on what you want to do.

Is it "code just to see that you can write programs".

Is it going to run something you're going to do the actual teaching with.

Or is it "we're doing GUI things today".

I think flask (on click -> different path, use that function do something, then return page) or even brython will work too.

Do you have something like a minimal example of what the end result of the lesson should be?

@bmaxv The final project for the class is a (single-player against an AI opponent) Scrabble game. I'd want the simplest thing that can support that. Basically just drawing colored shapes and text on the screen and recognizing mouse clicks and keypresses.

@peterdrake

Hmmmm.

I wrote / adapted this tictactoe game, about 300 lines, maybe that can help as orientation for how much code that could end up being.

github.com/BMaxV/pygame_tictac

I have not done much with pygame, but I can say that it does support getting mouse position, mouse click and keypresses.

And there is a big active community that can help.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.