OddThinking

A blog for odd things and odd thoughts.

Why the Python Main area should be small

Today, I am justifying a particular personal coding standard rule. If I explicitly argue the case, I hope I will conform to it more.

Read more...

Categories: S/W Dev
Tags: Python

How Python Logging Bit Me, Part 1.

In which Julian stumbles over a serious gotcha in Python’s SMTPHandler for logging messages.

Read more...

Categories: Heroic Failures,Insufficiently Advanced Technology,S/W Dev
Tags: logging. gotcha, Python, SMTPHandler, software

Windows Installer for PyXML 0.8.4 for Python 2.6.x and Python 2.7.x

For the modern Windows Python programmer, stuck with old libraries:

PyXML 0.8.4 for Python 2.6, Windows Installer (1,006 KB)

Read more...

Categories: S/W Dev
Tags: Python, PyXML

Animal Fight: A Question about OO & MVC

I have a Object-Orientation question, related to the Model-View-Controller (MVC) pattern. I suspect it will have a simple “here is the idiom everyone uses for this situation” type answer, but I haven’t found it. Here’s a fictional piece of software that demonstrates my problem.

Read more...

Categories: S/W Dev
Tags: MVC, OO, Python, software architecture

Hashes To Detect Resized Images

So, I have lots of photos, and some are duplicated on several web-sites, with no reference to the original source. I want to detect matches, so I can move them (and their associated meta-data) all to a single yet-to-be-determined destination.

But here’s the snag. Some of the photos have been made into different sizes and qualities for web-viewing. It would save me time if I could automatically detect this. I need an equivalent to SoundEx that works on images, so images have the same hash even if they are resized.

How would you do that? If you answered “Google it, and find what the standard solution is”, you might be smarter than me. This article is about what I did instead.

Read more...

Python 3000 exposes DOS vulnerability in OO Brain

Dynamically choosing base classes considered harmful.

Read more...

PyGame-Over?

A very brief examination of the PyGame 1.8 car-wreck.

Read more...

Categories: S/W Dev
Tags: Python, review, whinge

It ain’t easy seeing green…

Here’s a little puzzle for web-developers.

Netscape defined a number of colour names that, although not standard, are accepted by a number of browsers. Their definitions of some of the colours leave me rather confused.

Read more...