Bones' Blog of Stuff About Things

15 Jun

Quadrophenia!

Work today has been limited to getting and installing mod_python and reading some of the docs and some surrounding literature. It consistently surprises me just how bad an experience installing something on Linux can be. In this instance, I downloaded the tgz, extracted it and tried ./configure. It couldn’t find apsx, despite modpython.org stating that it was a standard part of the apache distribution. A bit of investigation and it turns out that Fedora separates this into a httpd-devel package.

#apt-get install httpd-devel

#./configure

Fixed, excellent.

#make

The terminal window filled with C compiler errors, so many in fact that I had to expand the buffer to be able to see them all. At this point any non-programmer would have been stumped. The instructions just say you need python installed and the configure script says it found python. In order to know what is wrong, you’d have to know something about programming, and have familiarity with C most likely. The compiler was complaining that some header files didn’t exist. A prime culprit seemed to be python.h, so I checked if it was on my system… nope.

But hang on, I have python. Then again, I had apache too, right?

#apt-get install python-devel

#make

Fixed. Sure, blame my distro, but blimey, it’s a bit of a geek-test isn’t it? And some people claim that Linux is ready for the mainstream. Like hell.

I then had a trawl about for discussions of how to approach a web-site design using python. It’s all a bit confusing and a lot of the information seems very old. As far as I can tell, there are three choices, which can be mixed. There’s the model where you call python scripts as programs (cgi, or cgi-like), the model where you embed python into web pages (psp) and the use of application servers (Zope, CherryPy). This may be a hopelessly naive and/or incorrect view, and to be honest, I didn’t find anything that made me think “Oh, yes, that would be a good approach for what I want to do” or even anything that made me feel I had a decent grasp of the options.

I can’t see much benefit in the app-server approach, especially when it would appear to cause potential issues when looking for hosting. I’m also rather dubious about the psp approach as a general solution as it seems very messy and difficult to maintain. For now I’m going to try sticking with the more direct mod_php methods, at least until I have a clearer view of what the pros and cons of the options are.

Leave a Reply

© 2012 Bones' Blog of Stuff About Things | Entries (RSS) and Comments (RSS)

GPS Reviews and news from GPS Gazettewordpress logo