Archive for the 'Python' Category

Singleshot FastCGI, other development

Sunday, September 11th, 2005

Encouraged by how fast Singleshot is when running as a persistant process but discouraged by the relatively scarcity of mod_python hosting, I wrote a FastCGI wrapper for Singleshot this weekend. It may be faster than the mod_python version. I feel better about it than the mod_python version, because I know exactly how [...]

Broken things

Sunday, August 28th, 2005

It is of course after I announce it that the new photo site starts losing in strange ways. Some requests don’t appear to complete .. sometimes.
Even requests that don’t go through Singleshot are affected. I’d wonder if my net is just flaky except I can repro it on [...]

Singleshot development

Sunday, August 14th, 2005

After months of inactivity, I finally got back to working on Singleshot this weekend. Following up from my last work experimenting with virtual items, I revamped how dispatching works. All requests (except for cached image requests) now go through a single CGI entry point. sscgi.py now dispatches to an [...]

Tagging in Singleshot

Thursday, May 19th, 2005

Suddenly gripped with an idea for how to do tagging in Singleshot, I created a virtual item type called ImagesByTagItem (and the notion of virtual items — items without a representation on the filesystem) and had its _load_items method cheerfully crawl the image store looking for images with the given tag in their ITPC keywords.
It’s [...]

In pursuit of rotated polaroids

Saturday, May 14th, 2005

I’ve been working on a site for some family members and selected the WP theme Travelogue for the WordPress install. I made a few modifications to the theme for my own use, including replacing the photo used in the upper left corner Polaroid. Replacing the Polaroid photo is relatively easy but [...]

Preferences storage for Watcher

Friday, January 28th, 2005

I wanted to store a few things for Watcher. It had to remember some preferences (the URL for the RSS feed, some timing options) as well as some state (etag, last modified, and the last seen entry from the RSS feed).
I figured a nice simple Windows Registry wrapper was just a google [...]

Worker and main thread in wxPython

Thursday, January 27th, 2005

All of the GUI toolkits that I have used only allowed updates to GUI elements from the main thread. In order to affect the GUI from another thread, the toolkit provides a safe way to post a message or event from another thread which will be handled by the main thread.
The first [...]

Traffic, ODE, a road to distraction

Wednesday, January 19th, 2005

On the drive home today I had the idea that I could write a traffic simulator and fool around with various scenarios to see how all the stupid traffic got clogged up in front of me.
I fetched and installed VPython because I had used it before to play with visualization. Pretty quickly [...]

Twisted wxPython

Wednesday, December 15th, 2004

I’ve been experimenting with both wxPython and Twisted. wxPython is a GUI toolkit and Twisted is a network programming framework. … but the example for using them together results in CPU-spinning polling….