Python and Apache
Subject:   Welcome to Python
Date:   2003-04-28 15:56:46
From:   anonymous2
Hi Peter, and welcome to the world of Python. I'm sorry people have been so hard on you here. Pythonistas are usually very mild tempered and friendly. I hope they haven't made you feel all negative to this great language.

To be honest, your article might fit better as a mail to the python-tutor mailing list asking for improvements, than as an introduction to python for people who don't know it.

The current python standard documentation is online here:

The central document once you get through the tutorial is the module reference, and be sure to read chapter 2 (Built-in Functions, Types, and Exceptions) well. It can be found here: and there is an index of standard modules at and a full index at

It's not too poorly organized, is it? As usual, it takes some time to learn where to look.

Of course, this is all too much to absorb in an hour, but Python can be a very useful tool for a long time, so it might be worth more than an hour or so to learn.

As others have pointed out, regex is obsolete, and not meaningful here anyway, and _mysql is internal, and normally nothing you use in your code. The kosher Python way is to use the DB-API 2 interface, MySQLdb.

I suggest you get the MySQL module at the source, instead of at Zope.

I think the tutorial at handles just everything you went into: Regular Expressions (but for real), cgi and MySQL.

It also introduces some helpful stuff you skipped, like the cgi module. Might I also suggest that you add "import cgitb; cgitb.enable()" in the beginning of your code. It helps with debugging...

Good luck with Python in the future.

/Magnus Lyckå