[Glade-users] Tutorial: Writing PyGTK applications in a visual way



Hello people.

I have written a small tutorial which shows how to use SimpleGladeApp
and simple-glade-codegen.py. They are software I wrote and they make
programming with pygtk much easier.

The big feature of simple-glade-codegen.py is that after you write your
own code in callbacks, and you run again the generator, your code won't
be lost. It is made by using comments of context in the code.

Callbacks and creation functions (for custom widgets) are used as usual
methods is classes, and widgets are used as attributes of the class as
you can see in this example:
http://primates.ximian.com/~sandino/python-glade/test_autocodegen.py
generated from
http://primates.ximian.com/~sandino/python-glade/test-autocodegen.glade


Feel free to tell me comments, suggestions and complains.


The url for the tutorial is:
http://primates.ximian.com/~sandino/python-glade/


Also, I have made a patch for glade 2.6.5 to enable to use my code
generator with glade.


The url for the patch is:
http://primates.ximian.com/~sandino/python-glade/glade-2.6.5-simplegladepython.1.patch


And here you can see a screenshot of glade patched:
http://primates.ximian.com/~sandino/python-glade/glade-2.6.5-simplegladepython.1.png


Here is an example of the style of generated code
http://primates.ximian.com/~sandino/python-glade/index.html#project2_py


And of course, the code generator and its module:
http://primates.ximian.com/~sandino/python-glade/simple-glade-codegen.py
http://primates.ximian.com/~sandino/python-glade/SimpleGladeApp.py


I'll write second part of this tutorial next weekend.

Thanks for reading.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]