G
I am trying to learn GUI programming in Python, but have to confess I
am finding it difficult.
I am not an experienced programmer - just someone who from time to
time writes small programs for my use. Over the years I have moved
from GWBASIC to QBASIC to Visual Basic, and now trying to move across
to a Linux platform. Python seems to be the best compromise between
the limitations of command line basic programming and the total
incomprehensibility of C.
Googling around it seems the best GUI is either Tkinter or PyGtk. I
found a book which recommended PyGtk, as it had a graphical design
option, Glade. Coming from a VB background I latched onto that and
bought the book (Beginning Python, Wrox), but it was a disappointment
(or more accurately a complete waste of money) - there was
insufficient detail in the text.
I've found the tutorial and reference manual on the PyGtk web site,
but although I've made some progress, I keep reaching points where I
have insufficient background to understand them. Currently I'm stuck
on dialog boxes (the code seems immensely complex for the equivalent of
MsgBox("Do you really want to do this ",vbYesNo) and I haven't
got it to work properly yet) and loading graphical images in anything
other than their original size, but every new step brings another
struggle
I've seen reference to a Tkinter book - something like 'Python
and Tkinter Programming' but it seems to be out of print and
unavailable.
Can anyone offer any suggestions as to the least painful way forwards?
I am trying to learn GUI programming in Python, but have to confess I
am finding it difficult.
Others recommended wxPython, PyQt and various derivatives. The trouble
is there's too much choice!
One development is that my local public library has, to my surprise,
managed to locate a copy of 'Python and Tkinter Programming' by J.
Grayson. I've not read it yet, and an initial flick through
doesn't look too promising but maybe I am mistaken..
Don't do it if you can prevent it.
GUI - toolkits are very complex beasts and at least to me a source of
pain far more as a joy. Python cannot help you making them
significantly simpler but on the contrary add just another level of
indirection. Python normally shines when you have to glue libraries
together or programming simply Python scripts for a broad range of
purposes but if the wrapped library publishes a huge interface with
hundreds of classes and thousands of methods and attributes the benfit
of Pythons abstraction converges to zero. Python does not offer a good
toolchain to take up with Swing, WinForms or Qt to name just a few
delivered with IDEs that are very helpfull in developing GUI apps. Not
to talk about documentation...
Conclusion: if you are already familiar with BASIC I would just
continue writing BASIC apps using VisualBasic dotNet, Windows Forms as
the underlying GUI toolktit and VisualStudio as IDE. Forget the
coolness factor of the language. Cool people never care a lot what
other people think. If you finally want to glue assemblys/controls
together in Python this is still possible with IronPython or
Python-dotNet ( which is a CPython binding to the CLR, available at
Zope.org ).
Can anyone offer any suggestions as to the least painful way forwards?
Kay said:Don't do it if you can prevent it.
Conclusion: if you are already familiar with BASIC I would just
continue writing BASIC apps using VisualBasic dotNet, Windows Forms as
the underlying GUI toolktit and VisualStudio as IDE. Forget the
coolness factor of the language. Cool people never care a lot what
other people think. If you finally want to glue assemblys/controls
together in Python this is still possible with IronPython or
Python-dotNet ( which is a CPython binding to the CLR, available at
Zope.org ).
...
Doesn't the python community already have enough assholes as it is?
Tim said:My wild-ass guess is that, same as most other Open
Source communities, we average [at] about one asshole per member.
D said:What kind of helpful advice is that?
So you recommend VB.NET on comp.lang.python, and then later publicly
flame me for mentioning boo a year ago, as well as spew FUD about other
languages you don't like. Doesn't the python community already have
enough assholes as it is?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.