Entries Tagged 'Python' ↓
December 30th, 2004 — Python
December 27th, 2004 — Python
As I mentioned previously, Programming Python is indeed not quite the book I was expecting it to be. After reading roughly 100 pages, I find that it delves for too long on subjects that are not quite related to Python (it spends an awful lot of pages in the os and sys modules, for example) and does not include any kind of introduction to novice programmers (on code formatting issues, for example, or lambda functions; this is assumed to be already known).
So, I’m taking a detour and moving on to the Python tutorial, which can be found online at python.org and in the standard distribution files. I’ll go back to the book afterwards…
December 24th, 2004 — Python
A few weeks ago, I started working on implementing a new print server at work, with a new quota control system. The old one was a made-at-home collection of scripts and text files, and lacked a few features we’d like to have. After some research, we settled on LPRng with Pykota. LPRng was simple enough to set up (although its interaction with Solaris print services is a little weird at times), but Pykota didn’t like our printers (mostly HP LaserJets of various models and ages) too much.
By the grace of open source code, I could fix the problems, of course. Which I did, and sent the patched code (with fixes and a new feature) back to the developer (my changes are now part of the default distribution). The funny thing is, Pykota is written entirely in Python, and I’d never programmed in Python before. I had heard mostly good things about the language, and was impressed by (1) how easy it is to do “complicated” things in it, such as talking to a database server and to printers using PJL and SNMP, and (2) how easy the code is to understand, such that even a Python beginner can make useful modifications without breaking anything.
So I decided I wanted to learn more about the language, and perhaps to start to do real stuff with it. With this spirit, I went to the library and picked up “Programming Python”, a 1000+ page tome of which I’ve already read… 20. I was expecting something very much like “Programming Perl”, but it’s a different type of book. For one thing, it expects you to know how to program in Python. I guess the book I should be reading is “Learning Python” instead, but the library didn’t have that one. For now, I’ll go on with this and blog about my progress. With some luck, after the holidays break, I’ll be able to write something in Python from scratch!