I’m back on Cantrip, after a month and a half of it being on Hiatus while I attempted to find and get back into the swing of the whole employment thing.

The story so far

Okay, so in case you missed it, that which was known as “PFd4” is now known as “Cantrip” because PFd4 is a heck of a mouthful for a small project.

Small project. Hah.

Today’s job has been structural. I tried to install mod_python and the MySQL bindings onto my local server, but it segfaulted every time, so I’m back to developing live, always fun.

I’m still wavering between using XML/XSLT as a templating engine or something like SimpleTAL. On the plus side, XML/XSLT is another tick on my list of “Things to learn”, on the minus side, this project is *already* crossing Python off that list (Whilst trying to learn mod_python at the same time) and it’s a little too much to do at once. I could drop off Cantrip for a while and get up to speed on XSLT, but to be honest I don’t want to go off on a tangent because I want to actually _use_ the fricken system sometime this millennium. OTOH, I don’t _think_ the XSLT in Cantrip would be really very complicated, and I’d have to learn TAL anyway to use the other templatinglanguage.

Other main job today has been learning how to talk to apache from python. Getting the thing running was done a while ago, but joining the dots proved difficult. I’ve stopped using mod_rewrite, working like this:

(Note, the handler file is in ./python/characteristic.py)

and moved to this:

(Note, the handler file is now ./index.py)

which is far less work, though I haven’t yet worked out how to stop it from handing /static (where css/image files are) too.

Finally, I discovered how to get the path information from inside the object, so I can find out what the user asked for, which is handy. Actually, mod_python.publisher‘s methodology is very similer to Epistula’s, though significantly better designed, in that it hands control over to the top level request, whcih then deals with everything underneath (For example, http://www.aquarionics.com/archive/2004/03/23 launches Epistula.php (for the top level) which hands control over to “archive.inc.php“, which explodes the remaining path (“/2004/03/23”) and does whatever it needs to (in this case, grab all the entries across public, date based ‘chapters’ for that date). This is basically what I intend Cantrip to do. I’ll explode the path, and serve up information based on whatever they ask for.

First step, ability to add users to the database…