Archive | Python RSS feed for this section

ImportError: No module named pysqlite2

Currently my favorite web app environment includes:

CentOS 5.5
Python 2.6 (built from source)
Pylons 1.0 (w/ SQLAlchemy 0.5.8)
nginx

Whenever I setup a new environment, and execute “paster serve –reload development.ini” for the first time, I always get a stack trace from SQLAlchemy that ends with the following error message:

ImportError: No module named pysqlite2

And it always takes me a [...]

Recursively checking for missing alt attributes on img tags with 38 lines of Python code.

Today I was the first time I’ve used my new found Python skills in a professional capacity. As part of a larger project, the client wanted me to check each HTML document for image tags missing their “alt” attributes. Knowing how tedious and impercise it would be to do this manually, writing a script was [...]

A PHP Developer Spends a Week with Python

Last week, I wrote about my discontent with PHP and why I chose to give Python a shot at becoming my new tool of choice. Since then, Python and I have spent a lot of time together getting acquainted. I’m finally becoming accustomed to the lack of semicolons and curly braces and have accepted Python’s [...]

From PHP to Python

Before I wrote my “Dear John” letter to PHP the other day, I had largely decided to move to Python as my primary tool. I had been on the fence for months about choosing to pursue Ruby or to follow the Python path. I purchased a book about each and did quite a bit of [...]