Archive for the 'Python' Category

photos.xythian.com and Singleshot

Sunday, October 23rd, 2005

I moved my photo site back to a machine I control directly. It’s probably not going to stay there, but it does free me from debugging everything twice when I want to add features. Since the last Singleshot release I’ve fixed a bunch of bugs in IPTC parsing (and added a fallback to use XMP [...]

Awful patches

Tuesday, October 18th, 2005

Also, apparently something else is also behaving differently on NearlyFreeSpeech, breaking the ImageMagick processor. I compensated with an awful hack and, just to be sure, pregenerating all of the view images so I can go to bed without, hopefully, leaving photos.xythian.com woefully broken. I think NearlyFreeSpeech is going to have to go. They seem fine [...]

Fascinating discoveries

Monday, October 17th, 2005

A fascinating discovery, a while after I launched my shiny new site about which I was very proud: mmap is all well and good on Linux on my home machine and on Dreamhost, but apparently doesn’t work on NearlyFreeSpeech. This .. is problematic for photos.xythian.com.

Reading CR2 and CRW metadata

Sunday, September 25th, 2005

I was curious about some statistics about the photos I’ve been shooting over the past few years and finally got around to begin writing a script to gather the stats I want. I knew virtually all of the digital camera photos in my tree were from some Canon camera, so I focused only on decoding [...]

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 many instances will [...]

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 my own machine occasionally. It was [...]

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 action handler named action_name.py where name [...]

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. [...]

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 involved several manual steps. [...]

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 search away. [...]

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 version of [...]

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 I found [...]

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….