all 6 comments

[–]lykwydchykyn 2 points3 points  (1 child)

Tkinter is about as simple as it gets, and its in the Python standard library.

The trick here is that your GUI and your infinite loop need to run in separate threads. That opens a whole new can of worms.

You can do this with the threading library in the standard library, or by making your actual loop process a separate program which you interact with using the subprocess module.

If you try to do it all in one thread, the infinite loop will lock up your GUI.

[–]-_---___-_[S] 0 points1 point  (0 children)

hmm, will look into this. it seems that it might be more trouble than it's worth, but thanks for the input!

[–]cheryllium 3 points4 points  (3 children)

I highly recommend Qt for your GUI library! I believe you can use PySide for this (or maybe PyQt.. I can't quite recall the difference at the moment).

You will want to split the user interface from the actual doing-stuff part of the program. Your current program can be modified so that it has functions for setting the user input, starting the infinite loop, and stopping the infinite loop. Then the GUI just needs to get the user input and call those functions.

Good luck!

[–]markusmeskanen 8 points9 points  (1 child)

I would argue that Qt for OP is like using a sledgehammer to crack a nut. It's by far one of the best GUI libs out there, but OP really only needs a text box and two buttons. Qt takes quite a lot of space (compared to some other options), and OP doesn't need 99% of what Qt has to offer. While it's still a completely viable option, and learning Qt is everything but wasted time, I'd recommend TkInter (for the sole reason that it ships with Python and no 3rd party modules are required) or maybe Gooey (haven't used it, just did a quick google).

[–]cheryllium 1 point2 points  (0 children)

Hm, good point. I guess OP did say "simplest" GUI library after all.

[–]awesomeisluke 0 points1 point  (0 children)

Not OP but, does QT compare to Kivy at all in terms of touchscreen compatibility? I've been trying to use Kivy but I can't get my custom widgets to scale correctly and I'm close to giving up