Python Rocks! and other rants
Weblog of Kent S Johnson

2008-04-16 14:36:14

Getting started with Python

Download a Python installer from http://www.python.org/download.

There are many resources available for learning Python.

For experienced programmers

If you have previous programming experience, a good list of online tutorials is here: http://wiki.python.org/moin/BeginnersGuide/Programmers. The standard tutorial is a good starting point. Dive into Python is a popular tutorial; it is also available in print.

Books for experienced programmers:

Other resources

The Python documentation is generally of very high quality. The Library Reference contains some essential reading that is often overlooked:

  • Built-in functions - this section documents all the built-in functions such as len() and open().
  • Built-in types - this section documents the built-in types - list, dict, set, str, etc.

The Regular Expression HOWTO is a good introduction to regular expressions. Python comes with a regex tester called redemo.py; look for it in the bin directory of your Python installation.

PEP 249 defines DB-API, Python's standard low-level database interface.

Getting help

The python-tutor mailing list is friendly, helpful and oriented toward newbies. Ask beginner questions here.

The comp.lang.python newsgroup (also available by mail) is a high-volume Usenet newsgroup for general discussions and questions about Python. It is a good place to ask - or search for - more advanced questions. Beginner questions are also welcome but the answers often get sidetracked.

The online Python Cookbook is another good place to browse and search.

Useful extras

BeautifulSoup is a parser for real-world (i.e. broken) HTML. Very useful for web scraping.

IPython is an enhanced Python shell. It has many useful convenience features. Highly recommended.

PyFlakes is a lint tool for Python. It integrates well with TextPad and can help find some types of simple errors.

Mark Pilgrim's Universal Feed Parser

Tools

The IDE that comes with Python, called IDLE, is fairly primitive. There are many choices of editors and IDEs that work with Python. Which is "best" is mostly a matter of personal preference. I like TextMate, a payware editor with good syntax coloring and the ability to run Python programs from within the editor. There are many other popular choices. Eclipse+PyDev and Komodo are probably the most popular IDEs that run on Mac OS X. They both have free and payware versions.

Winpdb is a useful windowing debugger. pdb is a simple command-line oriented debugger that comes with Python. Here is a good Winpdb walkthrough.

Puzzles and problems

If you like to learn by solving puzzles and small problems, you might enjoy these:

 
© Kent S Johnson Creative Commons License

Comments about life, the universe and Python, from the imagination of Kent S Johnson.

kentsjohnson.com

Weblog home

All By Date

All By Category

Essays

XML-Image

BlogRoll