Join Club ShowMeDo to Learn Python!

This series is a part of Club ShowMeDo. Click to learn why you should join our club with a simple monthly subscription.

  • We teach Python and all the cool modules
  • Topics include beginner Python, GUIs, Web and Desktop Apps
  • Long, specially crafted video tutorials just for you
  • Club video tutorials extend our normal Free content
  • Save your time - we've done the research for you
  • Keep your skills up-to-date
  • Learn at your own pace, everything you need is shown to you
  • Over 12 hours of archived material are waiting for you in the club

Name: [002] Ian Ozsvald
Member: 128 months
Authored: 181 videos
Description: I am the co-founder of ShowMeDo (see, author of `The Screencasting Handbook <>`_ and the founder of the professional screencast production company `ProCasts <>`_: .. image:: ...

Simple User Interfaces with easygui [ID:245] (4/17)

in series: Python 101 - easygui and csv

(Showmedo is undergoing major changes. To report any problems viewing the videos please email us and include browser and OS specifics. Cheers - Kyran.)

easygui is a great module for building simple user-interfaces, created by Stephen Ferg, built on top of Tkinter. Here we learn how to create a file-open box in just 1 line of code, so we can easily open any .csv file.

Tkinter is the cross-platform GUI module that is distributed with Python, but it has a learning-curve. easygui takes away the learning curve by providing a set of simple commands that let us build simple user-interfaces in just a few lines of code.

Task: Download from, look at the documentation and the python file Created May 2007, running time 8 minutes.

Got any questions?

Get answers in the ShowMeDo Learners Google Group.

Video statistics:

  • Video's rank shown in the most popular listing
  • Video plays: 1 (since July 30th)
  • Plays in last week: 0
  • Published: 111 months ago

Thank-yous, questions and comments

If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?

You may also want to see our ShowMeDo Google Group to speak to our active users and authors.

Your email address will not be published.

Show some quick comments >>

All comments excluding tick-boxed quick-comments

I'm running OS X. The easygui file dialog box dims all the files and doesn't allow me to choose one.

Very useful module. Thanks for the video.

Simple User Interfaces with easygui (4/17)

1:00 from easygui import

1:29 EasyGui videos

2:00 EasyGui instruction guide

2:54 sys.exit()

3:40 demo of open dialog (fileopenbox)

4:30 #sys.exit()

5:00 test with different CSV file

5:20 demo run at command line

5:54 other development environment errors (WING)


Gre8 video, everything is working so far.


Very helpful. I am wanting to create a simple data viewer that requires opening csv files, doing some simple processing and generating some plots. (Obviously easygui isn't going to do the plots but having a simple way of navigating to the appropriate file and opening it into a csv object is very helpful.

Ian, you kick ass :) Damn ole Tkinter is a bothersome bugger on debug time under Wing :)

great Its all so easy when u explain these things! much better than diving alone through thousands of pages

Do you have something for txt. file formatting and processing?

Hi Balek, sorry about that, the video is back - we had a glitch with the db.


Your video has been edited. This is an automatic post by ShowMeDo.

This video seems to be missing currently. I would love to see it. :)

Your video has been edited. This is an automatic post by ShowMeDo.

This is a great video, and seeing linking to Horst's videos was genius. Seeing those you guys using python with such ease is inspiring.

I'm using Ubuntu and SPE (Stani's Python Editor) and had no issues at all whilst working through this.

Cool, whilst we've had requests for pyQT I've not used it myself. Thanks for sharing your code, it looks really easy to try.


Very nice.

I actually like QT4 from trolltech, so I experimented and looked around a bit. and found I could do the same in PyQt4.

My code looks like this:

import csv

from PyQt4 import QtGui

app = QtGui.QApplication([]) # Need to create an Application

fileAndPath = QtGui.QFileDialog().getOpenFileName() # Show a File Open Dialog.

print "Using:",fileAndPath

reader = csv.reader(open(fileAndPath, "rb"))

for row in reader:

print row

Hi Marlow. Yes, the q&a is difficult here as our system doesn't really facilitate it. The old forum did - but that was hidden in another system so people didn't often find it.

The new Learners google group ( is specifically aimed at people just like you who have questions, where asking it publicly might yield several sets of interesting answers.

Do feel free to post in the Group to help get things started.



Yes, I agree that putting easygui into \Lib wasn't the best choice--because I'd like to have some easy way to maintain a standard system on other pc's. And when I update python versions the last thing I need is misc utilities & modules I've scattered in the system code! I'm just not familiar with the conventions yet. So thanks for the suggestion: I've moved it to \python25\site-packages That does seem to be where the extras you've introduced me to have installed themselves--so hopefully I'll remember to look there when updating or reproducing my setup to e.g. the laptop.

Posting q&as here in a lesson is somewhat awkward as I have to remember to which episode I've posted a question, etc. I added the rss feed to my home page, but the messages roll off fast enough that that doesn't help. The showmedo forums-which I guess didn't take off-would seem to be the easiest location--mainly because one is already in showmedo if you're working on some lessons. A google groups would be fine--if people use it. When I started lessons I looked at the showmedo group and most of the traffic was re. screencasting technology & business etc. A more active user/newbie community would certainly mean we could answer simple questions among ourselves and leave the real brain teasers to you gurus! ;-) Ha, not trying to kiss up too much, but I do appreciate your helpful answers!

Thanks also for the pointers to other python communities where help & disc of beginner issues is available. One difficulty with maintaining an active user/newbie forum here must be that after a while folks either grow out of newbiedom or give up. (I'm sure you observe a tutorial use lifecycle. I suppose you've got to keep cranking out interesting episodes to keep us hooked!) I'm already feeling more comfortable with the Guido's python tutorial book & looking stuff up. I appreciate the nice way your lessons periodically nudge viewers into looking things up, directing them where & how to answer their own questions to solve problems. It all helps make us more independent which is the goal all along.

Hi Marlow.

1) Easygui probably belongs in \python25\site-packages rather than in Lib. Normally all extra modules are put into site-packages or a subdirectory inside there, I'll guess that PyDev is looking there rather than in \Lib. You don't have to register anything, Python just searches the normal paths (e.g. site-packages).

2) If it is unused then fair-enough! I didn't know that pydev reports that, that's rather cool.

3) It is great that you've found a good place to post your questions :-) This is *exactly* why I have just (today) started a new Google Group called 'ShowMeDo Learners':

which will be aimed at all ShowMeDo users to discuss learning the topics that we carry. It will be especially useful to Subscribers who are all going through the same process with Python at the same time. I strongly urge you to join the Group, I'll be announcing it to everyone over the next week.

You might also want to check the official Python Tutor list which is very active:

and PyDev has its own forum:



Nice episode Ian,

I used Pydev which worked fine. No problems with the graphics, etc. although Eclipse/Pydev remains somewhat mysterious to me (still wonder about how to control the panels/windows....e.g. there's a problems window with errors remaining from an earlier .py file which I've long since closed. Seems odd I cannot clear the errors without restarting Eclipse or something.)

A couple questions:

1. I put into my f:\Python25\Lib\ directory--didn't want to put it into my application dir as you did since I'd like to use easygui in other projects. Python found fine & created the .pyc file just fine. However, pydev continues to report an error "unresolved import" on the import easygui line in my source code. Even though the little program works without error when called either from cmd or from within pydev. This is a mystery to me--when pydev is installed does it read & somehow "register?" files in \Python25\Lib\ ?

2. pydev also reports ...Unused import: sys Possibly the 'open("..' you used earlier required sys? I don't know, but anyway the pydev was correct on this one since I comment out the import sys and things work just fine. I presume this is because contains 'import sys' itself.

3. I post these comments here as I haven't found an active community in google groups.

Anyway, thanks for introducing easygui. I'd never heard of it & one of the reasons I had delayed getting into python is cause I'd been somewhat glum that I'd have to learn lots of Tkinter or wxpython or something else & learn the difference between them, etc. just to begin writing the slightest useful scripts. However, easygui fills this need nicely & is just what one needs for writing quick scripts--what I intend before moving on to anything big. Kudos to Stephen Ferg . This sort of community contribution tool is some of the longer run reason I'm wanting to spend time learning python rather than a newer version of visual studio.

I would like to see a 'howto' read the library reference in python so we dont get a specific knowledge of a library and isntead a knowledge on how to use any library.

many python library have auto-generated documentation (kind of like javadocs). However I can hardly follow it through. I would love to see a video on this subject.

Easy to follow and very references.

Fantastic. Now we are getting somewhere. I work on data analysis all the time and am always working on work-arounds - Python with CSV and easygui look perfect for the work that I do in GIS - great job on explaining it.

great video. I like the fact that the program is simple to start with experimentation.

Hi dexy. Look for the 'Download 910030.flv' link under the video, of course you have to have purchased the series to download it first.


Great videos.How can i download the videao

Great stuff :-) As I say in the video I had a similar reaction when I first learned about easygui from Horst's videos, and they were in German at the time!

easygui really is very nice, I'm enjoying writing a few blog articles ( about it at the moment.


I really enjoyed this video. In my spare time I have actually been playing around with wxPython and have been looking to alternatives (Tkinter was one) and didn't even think to use easygui. Looks like I'm going to have to watch the other easygui videos you referenced in the tutorial. This looks so much easier and your tutorial is very clear on how to use easygui to open a File-Open dialog and save the file selection for use later in your program. Thumbs Up!!

Great! Thanks for letting us know that it works on different platforms, so good to know!

Your videos are worth quoting from - they're great introductions (and the kids are just darn good at their presentations).


hehe, i think this is my all-time-favorite video...thanks for quoting my videos.. *bows*.

about easygui and linux: i used easygui on debian and ubuntu platforms from the python prompt , from Idle and from DrPython (wich is written in wxpython) and it always worked.

Showmedo is a peer-produced video-tutorials and screencasts site for free and open-source software (FOSS)- with the exception of some club videos, the large majority are free to watch and download.

how to help » about » faq »

Educating the Open-source Community With Showmedo

Although as important as the software it supports, education and documentation are relatively neglected in the Open-source world. Coders love to code, and explaining how best to use or improve the software tends to be deferred or even sidelined.

At Showmedo we believe the community can play a vital role here and also say thanks for the tools and software that make our lives easier. If you have a piece of software you love or a programming langugage you are enthusiastic about, why not make a screencast showing others how to use it? All the stuff you wish you'd been told, the tips, tricks, insights that would have saved you time and frustration.

Screencasting is easier than you think, and we're happy to help you. You can emailus for advice or just use some of the how-to screencasts on the site. This screencasting learning-pathis a good place to start.

Kudos and Thanks for Ian

3 Minute Oveview (What Does Python Look Like?)

simple and informative. you draw me in
70 months ago


Showmedo's development is fairly rapid and bugs will inevitably creep in. If you have any problems please drop us a line using the contact address below. Likewise, any suggestions for improvements to the site are gratefully received.