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.
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.
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.
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
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.
If you like to learn by solving puzzles and small problems, you might enjoy these:
|