A Byte of Python

History Lesson

In mid-2003 during my 7th semester of Bachelor of Engineering in Computer Science, we had a Database lab where we were supposed to write a project using databases. My project partner and myself used Qt and MySQL on Linux (after much convincing of our teachers who preferred us to use VB and Oracle) to write a medical laboratory management software for my Dad to help him manage his laboratory.

About two weeks before the final exam, we were informed that we had to create installers for our software to showcase to the external invigilators. Almost all the other students had used MS-VB, and so Visual Studio automatically created the installers for them. On the other hand, we did not have anything like that, so we were left to now create an installer. We decided that an installer was a good idea anyway because we wanted to make the installation painless so that non-computer-inclined doctors could use it as well.

We decided to use an interpreted language to write the installer so that they can double-click the script in the file manager and then run the graphical installer. We had to choose between Perl-Qt and PyQt bindings. I first looked at Perl-Qt since I knew Perl but did not know Python. I came to realize that the Perl-Qt bindings were not very good.

So, I decided to learn Python and started to search for information on the Python language. I came across an article by the famous Eric S Raymond about how Python had become his favorite programming language. I was impressed and so I decided that maybe learning Python would be worth the effort. I started a hunt for good information on Python but couldn't find any! I did find some O'Reilly books in the local bookstore but they were either too expensive or were more of a reference manual than a guide. I eventually settled for the official Python tutorial that is part of the standard Python documentation. However, it was too brief in its coverage. It gave me a fair idea of Python but it was not enough to make me comfortable with it. I was able to manage since I had previous programming experience but I felt that the official tutorial was unsuitable for beginners.

About six months after my first brush with Python, I installed the then latest Red Hat 9.0 Linux. I was gushing over the new look and feel of KDE and was playing with the new interface of KWord. I got excited about it and wanted to write something using it. Having become a Python fan, I just started to write about that. I kept on writing. It quickly became 30 pages long. I created a PDF and sent it to some of my friends. They really liked it and encouraged me to do more. I became serious about converting the information into a more usable format such as a tutorial or a book. After a lot of rewrites and all-nighters (Remember, I was in college, so I had to attend boring classes all day), I was able to improve my writings into a tutorial.

I eventually put up a website for it and released it under a Creative Commons license. I was totally unprepared for the flood of comments and suggestions that started coming. Various readers took initiative and constantly gave me suggestions and corrections. I remember reading a mail that said I had an extra space between a word and the dot at the end of the sentence!

The book has now reached a stage where it can be considered a useful guide to the Python language. I consider this book to be my contribution and tribute to the open source community and dedicate it to all those readers who sent me suggestions and gave me lots of encouragement.

This book started out as my personal notes on Python and in many ways, I still think of it in the same way, although I've taken a lot of effort to make it palatable to others ;-)