Upcoming Events

guest@talug.org: /Home/Events/17 June 2006 - Python$

17 June 2006 - Python

Topics

Python (by Carten Haese)

Attendance

15

Presentation Resources

Meeting Announcement (txt)

Meeting Flyer (png)

Presentation Code (tar.gz)

There are two programs in the tarball. One is called howold.py and the other is called reader.py. To run any of the programs you just run python [program_name] in the interminal. Note that reader.py requires the wx widgets library that might not be installed with your distribution by default.

Main Python website

Online Documentation (It's probably a good idea to start with the tutorial.)

Regular Expressions in Python: (For those attendees for whom my brief glimpse into the world of regular
expressions wasn't enough ;) )

If you'd like to experiment with GUI programming, here's a link to a
reasonably gentle tutorial on wxPython:

OpenOffice.Org scripting tutorial what applications are written in python?

  • Anoconda : the redhat/fedora installer
  • KDE Guidance: the kubuntu control center
  • Straw: the gnome rss reader
  • Bittorrent
  • 2381 other projects listed on freshmeat

Meeting Notes

The meeting started only 10 minutes late and ended 10 minutes early. In attendance were 2 new people, and almost the entire Monroe LUG members. During the 3 hours Carsten Haese walked us through many aspects of python. At the end we had a program to calculate how old you are in days, and a basic RSS reader running (in 60 lines of code). The RSS reader showed python GUI programming (through wx widgets), XML parsing (through xml.minidom), and basic socket programming (through urllib). At the end Carsten showed how you could use python to do some database programming, and how to use python to script openoffice.

The following are some of the notes I took during the presentation:

  • Python is a dynamic object oriented programming language and is not just another scripting language
  • different data structures are already in python: lists, dictionaries(hash tables), and tuples.
  • Strings, tuples, and integers immutable; meaning they could be modified in place
  • You get the user input in python using the function raw_input( ). ex: entry = raw_input("please enter input")
  • null, nill, NULL, etc... are translated into python's None
  • true and false are True and False in python
  • List comprehension. month, day, year = [int(x) for x in list]
  • strptime( ) string parse time
  • strftime( ) string format time
  • the variable _ is used as a do not care variable
  • ConfigParser [module] - reads INI like files
  • reload(module) - to reload a module

Member Login

Upcoming Events

July 2010
S M T W T F S
27 28 29 30 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Ubuntu 10.04 Countdown

Ubuntu: For Desktops, Servers, Netbooks and in the cloud

DistroWatch Feed

Sponsors

O'Reilly Media

Receive 35% off printed books and 45% off all ebooks purchased directly from O'Reilly Media. Simply use promo code "DSUG" when ordering.