2

Let's say there are multiple existing python objects and functions that I want to initiate via a GUI and input some custom code to work with them.

For example:

Obj1 and Obj2 are two instances of a class which have an attribute .value. f1 and f2 are some functions. These classes and functions already exist in some python file src.py I have locally.

Now, I want my students to be able to initiate as many of these instances (Obj1, Obj2) objects as they like, code some rule-based (custom) system, and then execute these functions (f1, f2).

A simple rule would, for example, be: If Obj1.value is larger than Obj2.value, execute f1, else, execute f2.

enter image description here

What simple to use graphical software would make sense for this sort of thing? The custom code would not necessarily have to be in python, but since it is quite simple, that would be favourable.

I think this would be possible with Apache Nifi or Node-RED (not sure!). Is it also realisable (without weeks of effort) using tkinter?

Additional info which might be relevant: The class of which the instances are called Obj1 and Obj2 contain MQTT subscriptions, so the .value is getting updated frequently. The functions f1 would make API POST requests and f2 would write a value into a database.

1 Answer 1

0

Take a look at [Boa Constrictor]http://boa-constructor.sourceforge.net/). Also, Google - I can't remember the name, but a few years back I found several free apps which would generate a GUI if your Python code uses argparse.

Aha, Google says Gooey (see also here).

Possibly https://github.com/codypiersall/cligui, although, on its GitHub page, the author himself says "Tell people to look at Gooey".

I am sure that there was at east one more, but can't find it at the moment.

Do you use argparse? If not, you should.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.