Python Template Weblog

June 6, 2005

Pity has a home

Filed under: Meta, Back-End — Tim @ 12:12 am

The folks at python-hosting have approved my free account and I’ve done some very basic set-up of Pity’s trac page and checked it all in to subversion. The site can be seen in all its minimalistic glory at http://pity.python-hosting.com/.

I’ve also done some work on the
main Pity menu, which seems like it’s in a pretty good boilerplate state—it’s not nearly done yet, but the basic page structure seems reasonably solid.

After this I’ll need to finish the sample pages, add a page on Pity, and do one more editing pass; at that point I can start announcing this project to the python web-programming community at large.

June 2, 2005

Introducing Pity to a Pitiless world

Filed under: Meta, Back-End — Tim @ 10:34 pm

Ok, I’ve done a lot of working on my code without actually adding any features. Mostly I’ve added decent documentation in the form of Epydoc strings, reorganized the files into a coherent structure, and added a setup.py, README, etc. I also applied for a free account at python-hosting.com, which can hopefully give me the public svn and trac access that I crave.

Most importantly, though, I’ve settled on a name for the framework as a whole: Pity. From the readme:

Pity is an acronym for “Pthon Implementation Template test framework Y”,
which should be self-explanatory. I suspect that as Python matures and
more of the good project acronyms are taken, we will begin to see more
project with names similar to Pity’s.

My current obsession is with adding more geegaws to the menu HTML and rearranging the forms to be more in line with modern, relatively sane web design practices. (Really I should be finishing the sample pages page.)

I figure I’ll be ready to unveil the site in about a week or so.

May 30, 2005

Functioning CGI back-end and interface

Filed under: Meta, Back-End — Tim @ 11:27 am

I worked on the back-end code and the interface to the template systems a good deal this weekend, and have managed to get them to a point where I like them. If I may say so, the interface is very pythonic, in that it’s highly dynamic. At this point, I have a working CGI script and a good class hierarchy for both view objects and template engines, and I think I’ve hit a nice balance between over-engineering the interface and making the code easy to use and extend.

As a test, I’ve implemented a simple pager in kid and PyMeld. The pager is a nice component because it’s so simple (with a view object consisting of two integers), but it seems like a good way to get a feel for a given template engine. I’m considering writing a pager in each system as a sort of sneak peek at each one before getting more in-depth with each engine in turn. That will also give me some time to get feedback from various template authors.

At this point I am going to need to write up the back-end, massage the code into something a little more releasable, and install it on my hosting provider. I want to reorganize the weblog layout a bit too. After that I’ll be ready to start publicizing this site.

May 27, 2005

Progress on the back end

Filed under: Meta, Back-End — Tim @ 10:35 pm

Having finished mocking up a few pages, I’m now concentrating on writing a very lightweight CGI script to test the various python engines. Amusingly, I’m finding myself wishing for a template system as I do it - what I have now is a very simple one based on open(fname).read() % data. I am strenuously resisting writing up my own template engine to run the comparison.

I’m doing this in CGI because my cheap (but good) web hosting provider won’t let me run long-running processes such as Quixote, Twisted, etc, and frankly I’ve already got enough poorly-organized documentation to read with the template engines; adding web framework documentation to the pile would probably drive me utterly insane.

In entirely unrelated news, my small patch for the Python syntax highlighter in GeSHi will be included in their next release.

Once I do a little more hacking, I’ll go back to working on the sample pages page and then start documenting the back end. One problem I’ve run into is that I won’t quite know what the back end needs to contain until I start templatizing the sample pages, but maybe it will be better to write the presentation objects before the I get into those nitty-gritty details.

May 26, 2005

More meta

Filed under: Meta — Tim @ 4:23 pm

Well, typically, I’ve spent lots of time on something utterly unrelated to the topic I’m allegedly concentrating on here. In this case that consists of tweaking my WordPress installation and making some changes to the GeSHi syntax highlighter to produce python code which is more appealing to mine eye.

If anyone is interested in the changes, you can look at the brief samples and download page I created. I’ve also added them as a feature request at GeSHi’s sourceforge page, so hopefully they’ll be in the next stable release.

In the meantime, I’m working on some sample pages to use for the templating tasks. Hopefully more will be done soon and I can get started on the next story.


[skreak.com] Powered by WordPress. Theme based on Parishudda by H P Nadig.