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: 109 months
Authored: 181 videos
Description: I am the co-founder of ShowMeDo (see http://showmedo.com/about), author of `The Screencasting Handbook <http://thescreencastinghandbook.com>`_ and the founder of the professional screencast production company `ProCasts <http://procasts.co.uk>`_: .. image:: http://procasts.co.uk/media/procasts_sma ...

Presenting the finished product [ID:258] (17/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.)

Here we present the finished article. First we use argInitialFile = '*.csv' in the fileopenbox (and filesavebox) to filter just the .csv files. We also remove the 'print' statements that we used during development and end up with the finished tool.

For further research you may want to investigate the Numpy numerical-python module, Python's built-in math module, matplotlib for great plotting and Tkinter for more on Python's GUI module.

Created May 2007, running time 6 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: 188 (since July 30th)
  • Plays in last week: 0
  • Published: 91 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 answered my own question: the optional argument argInitialFile used in the video does not work with the version of easygui.py that I downloaded, but the optional argument filetypes=["*.csv"] (in the easygui.fileopenbox()) does work.

It was my dream that easygui would allow me to write a program where the user has a graphical interface to manipulate a .csv file, but after examining easygui.py, I see that this was an unreasonable expectation.


Great series. I noticed that argInitialFile is now an obsolete argument in EasyGUI, replaced by default = "...."


Thanks. Very helpful series. Addressed my particular development needs almost exactly (reading and writing parameter files).

Presenting the finished product (17/17)

0:00 fileopenbox can take a file filter (*.csv)

[NOTE: new syntax is default='*.csv']

1:42 recap of series

Resources:

http://easygui.sourceforge.net/current_version/pydoc/easygui.html#-fileopenbox


Thanks a million for the videos! I typically reduce extremely large datasets (10 GB dataset is 'average', 100 GB large, 250 GB really busts my b*$$s... I started using Python to vastly speed up the data reduction (about 1000X faster... seriously) but my little utilities had a real 'hammerhead' user interface. After workking through the videos and doing the programming in parallel, I've been able to make some nice, simple but vastly easier to use GUI front ends that make my utilities a joy rather than something I fire up when everyone is at lunch. Just having an easy to use front end has made my life vastly more productive. The refactoring exercise was also very helpful for me, enabling code re-use much easier. I'm rewriting all my utilities now to incorporate what I learned here from your videos.

Thanks a million again!!!!


Thanks a million for the videos! I typically reduce extremely large datasets (10 GB dataset is 'average', 100 GB large, 250 GB really busts my b*$$s... I started using Python to vastly speed up the data reduction (about 1000X faster... seriously) but my little utilities had a real 'hammerhead' user interface. After workking through the videos and doing the programming in parallel, I've been able to make some nice, simple but vastly easier to use GUI front ends that make my utilities a joy rather than something I fire up when everyone is at lunch. Just having an easy to use front end has made my life vastly more productive. The refactoring exercise was also very helpful for me, enabling code re-use much easier. I'm rewriting all my utilities now to incorporate what I learned here from your videos.

Thanks a million again!!!!


Very helpful. I will probably revisit the unit testing stuff later.


Thanks Ian,

I watched the series for the intro to nosetest. I was somehow missing something form things I read, so this helped to fill in some holes. The csv and easygui stuff was pretty fun to learn about also.


This series seems nice...

I did only watch it (not doing any task/todo)

But I did get the impression.


Hi Ian, great series; I learned a lot. I found one other place where a bug could possibly exist, and that is when the user clicks "Cancel" in the fileopenbox. I've added some exception handling myself, based on the exception handling you included with the filesavebox. How's this?

if fileAndPath is not None:

print "Using:", fileAndPath

return fileAndPath

else:

print "No filename for opening"


Hi Ian, great video series. I have one problem though, I downloaded the files to watch a few segments again, but the flv files are downloaded with non-meaningfull names. The series is just what I needed though. Cheers!


This was a very interesting series. Trying to learn the same material from a book would have been a much less interesting experience. Well done!


Excellent series. Well paced. I thought I was stuck couple of times but I just paused the video and worked my way through it.

Much Appreciated. Thanks


Thank you very much for this series. Clear, well structured, concise and interactive.

1 hour and 20 minutes in the 17 videos themselves, plus an extra couple of hours actually doing the the exercises myself -- I reckon this was the equivalent of nutting through a text book for three times as long. And even then, the absorption from a text would not be as good because human memory is assisted by various inputs like hearing, "live" visual changes in front of your eyes, and of course, following along yourself.

Thanks so much,

Hamish


Hi Shane, sorry to hear you had problems on Mac OS X. I don't know what the fix would be for file filters with a Mac - I'll keep my ears open in case I hear of something.

Ian.


Great series.

I did encounter a problem trying to use the argInitialFile='*.csv' filter in getFileAndPath on mac osx 10.4.

When I run the debug i get the message:

Failed to open document '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk/tkCommonDialog.py'

If I change '*.csv' to 'measured.csv' it runs fine and measured.csv is preselected in the file open box. It still shows all the other files though.


That's *very* cool :-) Python is darn productive once you get a bit of time, I'm very glad that it helped you out!

Ian.


I found this site 10 days ago. Today, I wrote a Python program to convert a 10 Meg CSV file with mixed data into a formated text file. (and it worked!).

Great series, very useful.

The reason it took 10 days, was my job, wife and three kids which leaves about 30 minutes a night for Showmedo videos.


Hi Quant, thanks for the nice words, they are much appreciated!

Ian.


I think this is by far the most excellent understanding I have had on how python works. I bought multiple books, but the problem with every book is that they repeat the same fundamentals without giving an overall perspective of how a programming setup works. I think somethings in life are worth every penny. This series definitely falls into that category. Great work and you are an excellent teacher. Thanks Ian.

PS-Not to say that books are useless. I think I could place this series in perspective because I read those books in the first place!


I'm not planning on covering unit-testing again just yet, it is also covered in the Python Development (on XP) series:

http://showmedo.com/videos/series?name=pythonOzsvaldPyNewbieSeries

which should give you a reasonable background in how to use it?

Re. Functions - I have a plan to cover a 'new Python programmers guide' in the coming months, maybe that would help? Do ask in the Group:

http://groups.google.com/group/showmedo

and we can talk about the topics that you'd like to see covered.

Ian.


Thanks Ian, you have definately taught me new skills. I will learn more about easygui, UnitTesting and Thiker and get back to you. Everything was well explained. Could you maybe go over a simple video on Functions and UnitTesting.


Excellent series. I learned a lot and would invest in your series again in the future.

I'd be interested in additional screencasts on test driven development.


I started with the first series which was clear,concise and very understandable.

I have always been interested in programming and took my first 'baby' steps with Java.Although I have the basics in Java,I must say the tutorials on this site are truly out of this world!My python knowledge and competence surpasses my Java by far and yet I've only recently started on python.

I have spent the better part of today stepping through this,my second series,and I have learnt so much!In just a couple of days these tutorials have

got me writing my own programs and they actually work (my programs that is)!

A big thank you to Ian and the team,and to anyone thinking of getting into programming I urge you to

give these tutorials a go.They are definitely very good value and are much better than any other comparable tutorials I've tried!

I'm eagerly awaiting the next installment.Once again,thanks Ian!!!


Hi Jshack. Cool, it is always nice to know that I've passed information on!

Don't forget - I'm always open to suggestions for other topics you'd like to see covered in a series,

Ian.


Very well explained. I've learned a lot about debugging code. The ability to print the code, work through the problem and review the screencast, makes for clear understanding of what's going on. Thanks.


I don't know how you explain this any better. I've learned a lot about debugging code. The ability to print the code, go through it and then go back and review the screencast makes understanding what's going on, easier. Thanks.


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

Content

Feedback

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.

feedback@showmedo.com