Related Sites | SpyderMap | Web Portal

Archive for the 'programming' Category

Python Round Up

I really haven’t spent much time looking around at Python blogs/pages/etc lately.  But, since I’m procrastinating from the whole NaNoWriMo thing, I spent time today doing that.

Easy Python decorators –some examples of creating Python function decorators using the decorator module.
Python 3 Patterns and Idioms –early development of an open source book to discuss patterns and [...]

Sending HTML Email From Python

I forget where exactly I found this, but the other day I needed a quick Python method to send an HTML email — in my case, it was in response to a Web CGI request, but this example below is usable anywhere.  The bits that need to be changed for different situations should be evident [...]

Death of a Hard Drive

On Saturday, one of the hard drives in my near ancient Linux server failed. Even though I had back-ups of some of my data, I was lax and hadn’t backed up some of the information for a few of the web sites that reside there.
So, until I can rebuild those web sites, I have [...]

Singleton Pattern for Python

In software engineering, the singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. Sometimes it is generalized to systems that operate more efficiently when only one or a few objects exist.

class [...]

EVE Online’s Stackless Architecture

I just saw this article about EVE Online’s Server Model. Very interesting and informative read, and a testament to Stackless’s reliability and usability.

Perspective Broker Authentication for Stackless Python

Twisted Matrix’s Perspective Broker is, to me at least, the main compelling reason to use the entire framework. It’s also an area that is lacking in documentation that is usable to a newbie to the framework.
One of the things provided by the Perspective Broker is an authentication framework, based around the concept of an [...]

A quick update…

I planned on having an entry tomorrow showing a more in-depth example of combining Twisted with Stackless python, but it’s taking a little longer than expected to get all the pieces together. The example will be using what is in my opinion the most useful part of Twisted: the Perspective Broker. I [...]

Multi-Threaded Twisted / Stackless Integration

Another way to integrate Twisted with Stackless python, is to use multiple threads. One thread handles Twisted’s reactor while Stackless tasklets run in at least one other thread. This lowers the deterministic nature of Stackless, but for certain conditions may be more effective than trying to integrate Twisted and Stackless into a single [...]

Observer pattern for Python

The Observer pattern is mainly used to implement a distributed event handling system. The primary objective of this pattern is to provide a way to handle run-time one-to-many relationships between objects in a loosely coupled arrangement.
In this configuration, the Observable object doesn’t know anything more about it’s Observers than a very limited interface. [...]

Event-based Programming for Python

Oftentimes, you need to have objects that communicate with each other via events. This is a very useful setup, for example, in a GUI — where these events represent things like mouse clicks, key strokes, or button presses. That’s not what I developed these classes for, since I was more interested in simulating [...]