Pygtkconsole

Main.Pygtkconsole History

To do this example you will need to have the python-gtk+2.0 package. Then download the pygtkconsole from [http://www.pygtk.org/pygtk2tutorial/examples/pygtkconsole.py here] and finally execute it into the interactive shell.

to:

To do this example you will need to have the python-gtk+2.0 package. Then download the pygtkconsole from here and finally execute it into the interactive shell.

We used some nifty modules suhch as signal, sys and os for setting our groundbase with the creation of the system console. Then a module to interact between the system and the interactive console and finally signals, sockets and select for the type of connectivity this instructions will be connecting to the GUI module.

Finally the module GTK and gobject buts the GUI toolkit at the mercy of python.

The second one is the logic in which the interactive console with connect with the system.

We create a window with a widget. The last line even go as far as dynamically modifying the label of the button.

to:

We create a window with a widget. The last line even go as far as dynamically modifying the label of the button. So we can send singals on the dynamic shell and see the label hello inputed on the line "" b.connect('clicked', hello) to "Hi there".

The source of the pygtkconsole is not that hard and contains less than 100 lines of code.

This programm works as a extraction of the normal initialization of modules plus the creation of each GTK widget and the signal interface. What this console do is basically simplify the coding of small GUI to a great extend. I personally found it similar to the wxPython syntax.

To do this example you will need to have the python-gtk+2.0 package. Then download the pygtkconsole from [http://www.pygtk.org/pygtk2tutorial/examples/pygtkconsole.py here] and finally execute it into the interactive shell.