Re: Easy gtk2 binding



I'll echo what somebody else said here:  Use Python:

http://www.python.org/

Python is easy to learn & use, and is object oriented from the bottom
up.  (As opposed to Perl, whose object-oriented stuff is kind of
grafted on the side as an afterthought.)  Python has nice gtk bindings: 

http://www.pygtk.org/

And you can use Glade to build your windows; here's one tutorial:

http://laguna.fmedic.unam.mx/~daniel/pygtutorial/pygtutorial/

You can Google up zillions of other sites describing how to use
Python/GTK/Glade as a RAD suite.

As for my experience:  I wrote a GUI installer for the gEDA Suite
(GPL'ed electronics design package) using Python, GTK, and Glade.  The 
installer checks for dependencies, asks the user a bunch of questions,
and then wraps the "configure && make && make install" process.  Like
your proposed work, this program was not complicated (the algorithm is
simple); creating a functional GUI and issuing a bunch of shell
commands is the main business of the program.  The whole thing took me
about 3 -- 4 weeks of nights/weekends development.  Doing the
equivalent thing in C/C++ would have taken *months* due to both the
complexity of the languages, as well as the longer debug cycle. 

One final note:  When you are done with your work, and want to
distribute it, Python has a facility called "freeze", which basically
takes your program & all the libraries it depends upon & bundles them
up into a single portable executable.  Sometimes, getting freeze to
work correctly is a little tricky with GTK, but once you've done it,
you can run your executable on any machine, even if it doesn't have a 
Python interpreter on it. 

Have fun!

Stuart


Hi,

in the past I programmed gtk2 only with the C and C++ bindings. Now I
like to create a GUI for Linux that makes heavy use of shell commands,
sed and awk. So I think a better solution would be to use some scripting
language, because C and C++ isn't the right solution for this. I don't
know much scripting languages. I know programming of bash, LUA and some
basic skills in several other scripting languages. So which is the "best
and easiest" to learn scripting language with good supported gtk2
bindings? Perhaps OO would be great. And  I like to use Glade for UI
design and libglade to create the GUI. Please tell me your experience.

regards
Andreas
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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