473,473 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

GUI tutorial

Can someone point me in the direction of a good tutorial on programming
python with a GUI? I'm just starting out with python and have written a
few scripts successfully but would like to add a graphical front end to
them to make it easier for my work colleagues, most of whom have never
used a command line, to use.

Regards, John
--
War is God's way of teaching Americans geography
Ambrose Bierce (1842 - 1914)
May 13 '07 #1
8 2204
John K Masters <jo*********@oxtedonline.netwrites:
Can someone point me in the direction of a good tutorial on programming
python with a GUI? I'm just starting out with python and have written a
few scripts successfully but would like to add a graphical front end to
them to make it easier for my work colleagues, most of whom have never
used a command line, to use.
http://infohost.nmt.edu/tcc/help/pubs/tkinter/ is pretty good. You
could alternatively consider writing your script as a web server or
web app, so the gui would be a browser. That puts some limitations on
the gui design but it makes development and deployment both simpler.
Develoment is simpler because you just use regular HTML instead of
weird libraries and callbacks and threads and all that crap.
Deployment is simpler because you can install and run the program on
one machine, send the url to your colleagues, and update the program
as needed without having to get your colleagues constantly installing
new versions. For security reasons, be careful to not expose the web
interface to the public internet until you know what you're doing.
May 13 '07 #2
On May 13, 10:51 pm, John K Masters <johnmast...@oxtedonline.net>
wrote:
Can someone point me in the direction of a good tutorial on programming
python with a GUI? I'm just starting out with python and have written a
few scripts successfully but would like to add a graphical front end to
them to make it easier for my work colleagues, most of whom have never
used a command line, to use.

Regards, John
--
War is God's way of teaching Americans geography
Ambrose Bierce (1842 - 1914)

That depends on which GUI toolkit you want to use.

There are at least one or two good online tutorials on the Web for
Tkinter (the Python interface to the Tk toolkit).
One is by Fredrik Lundh (a.k.a the effbot, a leading Python
contributor). Google for suitable keywords, e.g. Tkinter tutorial.

Tkinter comes with Python by default on Windows, so that helps. But
wxPython is not a bad toolkit either.
(You'll have to download and install it, also the demos (see below)
are often a separate download.)
I've used it some, and like it. I don't know of any tutorials for it,
though there may be some - again, Google for info.
But if you already have some GUI programming background, its not too
difficult to pick up it up. It comes with a big set of demos with
source code, and I was able to learn enough wxPython to write some
simple apps just by looking at the demos source code and reading some
of the reference documentation. Those apps are here:

http://www.packtpub.com/article/Using_xtopdf

Check the last part of the article for links to the source code.

PyQt is another option, recommended by some people. Haven't tried it
myself but have used Qt (the C++ GUI toolkit to which PyQt is a
binding) a little, and like it a lot. Qt again is supposed to be of
very high quality, according to some people. I am currently reading a
book Programming Qt and found most of it pretty straightforward
(though not simple :-) to understand (you do need to understand the
concept of signals and slots, as that is fundamental to Qt
programming).

HTH
Vasudev Ram
Dancing Bison Enterprises
http://www.dancingbison.com
May 13 '07 #3
John K Masters wrote:
Can someone point me in the direction of a good tutorial on programming
python with a GUI? I'm just starting out with python and have written a
few scripts successfully but would like to add a graphical front end to
them to make it easier for my work colleagues, most of whom have never
used a command line, to use.
If you're using Linux or some other unix-like platform, try PyGTK:
http://www.pygtk.org/pygtk2tutorial/index.html
(Yes, it can run on Windows, but it tends to be more complicated there).

--
(\__/)
(O.o)
(< )

This is Bunny.
Copy Bunny into your signature to help him on his way to world domination!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGR5ShldnAQVacBcgRAhGGAJ9UEQwyHgMZc4S1K3OSWd 74uq6zaQCgxGx9
5OXpBe8TyrWCCvJyjQh6SdY=
=A1Do
-----END PGP SIGNATURE-----

May 13 '07 #4
On May 13, 12:51 pm, John K Masters <johnmast...@oxtedonline.net>
wrote:
Can someone point me in the direction of a good tutorial on programming
python with a GUI?
Alan Gauld added a gui programming tutorial to his main course.

http://www.freenetpages.co.uk/hp/alan.gauld/

It's a frame page so I can't link directly, but select "GUI
Programming" under Advanced Topics on the left.

rd

May 14 '07 #5
On May 14, 2:57 am, BartlebyScrivener <bscrivene...@gmail.comwrote:
On May 13, 12:51 pm, John K Masters <johnmast...@oxtedonline.net>
wrote:
Can someone point me in the direction of a good tutorial on programming
python with a GUI?

Alan Gauld added a gui programming tutorial to his main course.

http://www.freenetpages.co.uk/hp/alan.gauld/

It's a frame page so I can't link directly, but select "GUI
Programming" under Advanced Topics on the left.
It may be worth pointing out that the information about licensing on
that page
is a little vague and inaccurate in places. PyGTK is actually licensed
under
the GNU LGPL, not the GPL, and both PyQt and PyGTK can be used to
create
commercial applications as long as those applications are not closed
source.

David

May 14 '07 #6
BartlebyScrivener napisa³(a):
>Can someone point me in the direction of a good tutorial on programming
python with a GUI?

Alan Gauld added a gui programming tutorial to his main course.

http://www.freenetpages.co.uk/hp/alan.gauld/

It's a frame page so I can't link directly, but select "GUI
Programming" under Advanced Topics on the left.
wxPython section of this tutorial seems bit outdated (the code resembles
what was required in time of wxPython 2.4). Anyway, the explanation of
event-driven approach is essential.

--
Jarek Zgoda

"We read Knuth so you don't have to."
May 14 '07 #7
John K Masters napisa³(a):
Can someone point me in the direction of a good tutorial on programming
python with a GUI? I'm just starting out with python and have written a
few scripts successfully but would like to add a graphical front end to
them to make it easier for my work colleagues, most of whom have never
used a command line, to use.
Each of GUI frameworks/libraries has its own tutorial and some even more
than one... The choice is directly related to what library you would use.

--
Jarek Zgoda

"We read Knuth so you don't have to."
May 14 '07 #8
On 15:03 Mon 14 May , Jarek Zgoda wrote:
John K Masters napisał(a):
Can someone point me in the direction of a good tutorial on programming
python with a GUI? I'm just starting out with python and have written a
few scripts successfully but would like to add a graphical front end to
them to make it easier for my work colleagues, most of whom have never
used a command line, to use.

Each of GUI frameworks/libraries has its own tutorial and some even more
than one... The choice is directly related to what library you would use.
Thanks to all for the advice. I shall start with Py-GTK and see how it
goes.

Regards, John
--
War is God's way of teaching Americans geography
Ambrose Bierce (1842 - 1914)
May 14 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rhino | last post by:
Can anyone point me to a good free XSLT Tutorial online? I looked for some a few months ago and didn't find anything very good. I'm hoping some of the experts here can point me to a good XSLT...
15
by: binnyva | last post by:
Hello Everyone, I have just compleated a JavaScript tutorial and publishing the draft(or the beta version, as I like to call it) for review. This is not open to public yet. The Tutorial is...
18
by: Xah Lee | last post by:
i've started to read python tutorial recently. http://python.org/doc/2.3.4/tut/tut.html Here are some quick critique: quick example: If the input string is too long, they don't truncate it,...
0
by: Joe Mayo | last post by:
I've recently updated the C# Tutorial at C# Station with a new addition, Lesson 17: Enums. The C# Tutorial may be found at http://www.csharp-station.com/Tutorial.aspx. Other updates include:...
10
by: Safalra | last post by:
When a poster in a forum I frequent said they were beginning to learn HTML, I thought I should direct them to a good HTML tutorial so that they wouldn't start using <blink> and the like....
11
by: Magnus Lycka | last post by:
While the official Python Tutorial has served its purpose well, keeping it up to date is hardly anyones top priority, and there are others who passionately create really good Python tutorials on...
7
by: Turbo | last post by:
I have a written a detailed html tutorial here:- http://sandy007smarty.seo.iitm.ac.in/2006/09/26/html-tutorial/ I know there are a couple of html tutorials out there. But its a tutorial without...
2
by: sara | last post by:
Hi All, I learned C++ long time ago and now I want to review all of its details in a short time like a week. I wonder if there is a good tutorial you know which I can read for this purpose....
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.