Benutzer-Werkzeuge

Webseiten-Werkzeuge


start

Dies ist eine alte Version des Dokuments!


GuiPy

GuiPy is a Python IDE for teachers and students. Most Python IDEs only support text-based coding. GuiPy instead provides several graphical tools that support learning and teaching Python programming concepts. These include:

  • GUI designer for Tkinter and TTK
  • 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.
  • Structogram editor to create strutograms and convert them into Python code.
  • Sequence diagram editor to model sequence diagrams with lifelines and activations.

Class Modeler

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.

UML Window

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.

GUI Designer

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.

Struktogram editor

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. Manually drawing structure diagrams on paper does not bring any good results, because structural changes are practically impossible. With the structure diagram editor, structure diagrams can be created easily, quickly and correctly. Python source code can be generated from structograms, but this must then be edited. This helps when implementing in Python.

The reverse way also works. In the editor you can select source text and use it to create a structured diagram.

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.

The green P generates a Python function from the structure chart as far as possible. The texts used in the structure chart can be adjusted in the configuration.

Sequence diagram editor

The Sequence Diagram Editor allows you to create a sequence diagram interactively. Lifelines come in two forms, actor and 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.

start.1646480330.txt.gz · Zuletzt geändert: 2022/03/05 12:38 von roehner