GuiPy is a Python IDE for teachers and students based on PyScripter. Most Python IDEs only support text-based coding. GuiPy instead provides several graphical tools that support learning and teaching Python programming concepts. These include:
- Class modeler for modeling classes with attributes and methods
- UML window with classes and their relationships. You can create objects by calling the constructor. Methods of objects can be called interactively.
- GUI designer for Tkinter and TTK
- Structogram editor for modeling algorithms and convert them into Python code.
- Sequence diagram editor to model sequence diagrams with lifelines and activations.
The Class Modeler is an easy-to-use tool for modeling classes. The class modeler allows you to create new classes and edit existing classes. It reads Python files and represents them as a class with attributes and methods. Changes in the Class Modeler are applied directly to the associated Python file.
The order of attributes and methods in the structure tree can be changed using Drag&Drop.
You call the class modeler via the icon in the editor window. You can also double-click the desired class in the UML window or use the context menu to invoke the class modeler.
The class modeler takes the UML standard into account, which is why String is also offered as a data type. When converted to Python source code it automatically becomes str.
After you have modeled a class using the class modeler, it is time to test your model. In the uml window, by opening the context menu of a class with the right mouse button, you can invoke the constructor to create an object interactively.
If you then call the context menu of the created object, you can edit the attributes and call the methods of the object. Changed attribute values are easy to see and objects created by a method call are immediately displayed. This is especially useful when working with dynamic data structures such as lists and trees.
After testing your model in the uml window you can use it in a console or GUI program.
It's quite complicated to design a graphical user interface with layout managers. Students have considerable difficulties with this. It's much easier to drag and drop widgets to the desired position on the form. The GUI designer available in GuiPy therefore does not use layout managers but absolute positioning, which allows you to design your layout quite quickly.
To create a GUI program, click the icon on the „Program“ tab. This provides a skeleton program in an editor window and a GUI form.
To place a widget, first click its icon on the Tkinter or TTK tab and then on the GUI form. Alternatively, you can drag and drop a widget from a tab onto your GUI form. You can then position the widget and configure it using the object inspector. The source code is synchronized accordingly.
Use the icon of the source code editor to open the associated GUI form.
The GUI form has a context menu for editing the widgets.
GuiPy has a structogram editor that can be used to create and edit structograms.
The modeling of processes with structograms on a programming language-independent level plays an important role in computer science lessons because algorithms can be modeled on an abstract level without specific programming language details. An algorithm can be understood without being able to program it yourself in Python. Drawing structograms by hand on paper does not produce respectable results, because structural changes are practically impossible. With the structogram editor, structograms can be created easily, quickly and correctly.
Python source code can be generated from structograms, whihc must then be edited. This helps when implementing in Python. The other way round is also possible. In the editor you can select source text and generate a structure diagram from it.
Structural chart elements can be inserted into and extracted from a structogram using Drag&Drop. If you pull down a structogram element, all subsequent elements are also separated. Structogram elements can be dragged out of the left toolbar and dragged back onto the toolbar to delete them. You click on empty structure chart elements and simply type in the text. For subsequent editing, double-click the relevant text.
Using Drag&Drop, structogram elements can be inserted into a structogram and pulled out of a structogram. If you drag a structogram element downwards, all the elements following it will also be separated. Structogram elements can be pulled out from the left toolbar, to delete them you can drag them back to the toolbar. Empty structogram elements can be clicked on and the text can be simply typed in. For subsequent editing, double-click the text in question.
The green P generates a Python function from the structogram as far as possible. In the configuration, the texts used in the structogram can be customized.
Sequence diagram editor
The Sequence Diagram Editor allows you to create a sequence diagram interactively. Lifelines come in two forms, as an actor and with a named head. They are inserted using the toolbar. To create a connection between lifelines, use the context menu of a lifeline and call connect to there. To change texts, call up the text editor by double-clicking.
Sequence diagrams are saved with the file extension psd. These are text files that can also be edited with external text editors.
GuiPy is a Windows Application.
GuiPy operates under Linux with the wine extension. You find installation hints on the WineHQ page. The font Monospace ist recommendend. Some fonts don't really work in the editor.
GuiPy works on a Mac with CrossOver Office (Wine) as well as in a virtualized windows environment. On a 64-bit Mac it works under the virtualization software VMWare Fusion. You can use GuiPy with the Oracle VM Virtual Box as well.
On a Mac with M1 or M2 processor you can set up GuiPy as follows. First, download the free UTM software https://mac.getutm.app/ and install it. To install, drag the UTM icon onto the Applications icon in the UTM window.
The UTM instructions for downloading a Windows ISO file are complicated and often do not lead to the goal. Therefore, the next step is to install the test version of Parallels for Mac https://www.parallels.com/de/products/desktop/. With Parallels then download a working Windows 11 ISO file. The trial version of Parallels is uninstalled again. Finally, you call up UTM and create a virtual machine with Windows 11.
In Windows 11, Python is then installed first and then GuiPy. Download and install a 64-bit version of Python (x64/amd) from https://python.org. Typically it is installed to C:\Users\<username>\AppData\Local\Programs\Python\Python3xx.
Currently the 64-bit „Personal Version“ of GuiPy cannot be installed. Therefore, download the „Special Version“ and unzip the zip file. Then start the program setup.exe and install in the suggested folder C:\Program Files\GuiPy\.
After starting GuiPy, there is a message about a missing Python version. Close both associated windows. Then open the configuration via the tools menu. Click „Unregistered Versions“ and then click „Add“. Select the Python installation folder:
Finally, select the pythin version provided in GuiPy and activate it.