[Tutor] Alright... I'm new...
Eike Welk
eike.welk at gmx.net
Thu May 10 02:13:08 CEST 2007
On Thursday 10 May 2007 00:13, Jeff Molinari wrote:
> I know I'm in the very early stages of programming. I'm just a
> big newb. But it just isn't clicking. I understand, as stated
> before, what I've been taught. But I don't understand how it could
> all come together to create a program. I understand that programs
> don't HAVE to have a GUI but when I think programs or software I
> think interactivity. I'm just not sure where this is leading me.
GUI programs are normally written with GUI toolkits (also called
application frameworks). This way you don't have to write the drawing
code for buttons and text and other standard GUI elements.
The toolkits are usually written in C or C++ but many have Python
bindings.
Two prominent examples which I know of are:
QT:
http://doc.trolltech.com/4.2/index.html
wxWidgets:
http://www.wxwidgets.org/
Python however comes with an integrated GUI toolkit: Tkinter.
http://www.pythonware.com/library/tkinter/introduction/
To give you an idea, here is a very simplistic example program. It
should display a window with the words 'Hello world!' in it. Copy it
into a file (for example test.py) and run it.
#---------- program start---------------------------------
from Tkinter import *
widget = Label(None, text='Hello world!')
widget.pack()
widget.mainloop()
#---------- program end---------------------------------
I think you should follow the programming book, and when you are done
with it you should ask on the list which GUI toolkit you should
learn.
Regards,
Eike.
More information about the Tutor
mailing list