[ubuntu-za] Documentation
Bill Cairns
cairnsww at gmail.com
Wed Apr 14 14:29:14 BST 2010
On Wed, Apr 14, 2010 at 10:25 AM, Corrie Strydom <corrie206 at gmail.com> wrote:
>
> Hi Bill, are you looking for specific Python documentation? Have a look at
> "diveintopython" in Synaptic, you can install this documentation, it will
> install to file:///usr/share/doc/diveintopython/html/toc/index.html in a
> browser.
> My python-doc installed
> to file:///usr/share/doc/python-doc/html/contents.html in a browser
> Corrie
>
Hi Corrie,
I am already a great fan of Dive Into Python and also use (in hard
copy) David Beazley's Python Essential Reference. I now feel quite
comfortable with Python and have started broadening my horizons with
GTK. At first I used GTK "straight" and found it exceedingly verbose
and cumbersome - but at least I now know the fundamental concepts. It
was then that I discovered Glade.
Glade seems the ideal tool because of the way that iy completely
separates the GUI development from the programming of the application.
I have written a fun little application to help me do crosswords using
Glade and Python and am impressed by the way that I have twice changed
the look of the GUI without touching the program.
However, what I have learned about the Python - LibGlade interface is
mostly what I have learned from copying and pasting from simple
tutorials. So I have used code like:
self.wTree = gtk.glade.XML( "XWordGUI.glade" )
dic = {
"on_buttonQuit_clicked" : self.quit,
"on_XWordWindow_destroy" : self.quit,
"on_entryTemplate_activate" : self.enter_callback,
"on_findButton_clicked" : self.enter_callback,
"on_checkbuttonAnagram_toggled" : self.toggle_anagram
}
self.wTree.signal_autoconnect( dic )
and
win = self.wTree.get_widget("entryTemplate").get_text()
(Sorry about the indents if they don't work - my one hassle with python)
But I don't really have a clue how "gtk.glade.XML (nnn)" or the
"xxx.get.widget(nnn).get_text ()" work - or even worse how to change
them when I use a different widget. Right now i want to use the Glade
filechooser dialog but am not sure even where to get the file name
...
More information about the ubuntu-za
mailing list