Archive for the 'programming' Category
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 [...]
November 13th, 2008 | Posted in programming | No Comments
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 [...]
October 24th, 2008 | Posted in programming | 3 Comments
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 [...]
October 12th, 2008 | Posted in programming | No Comments
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 [...]
October 6th, 2008 | Posted in programming | 1 Comment
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.
October 3rd, 2008 | Posted in programming | No Comments
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 [...]
October 2nd, 2008 | Posted in programming, twisted integration | No Comments
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 [...]
September 30th, 2008 | Posted in programming, twisted integration | No Comments
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 [...]
September 30th, 2008 | Posted in programming, twisted integration | No Comments
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. [...]
September 27th, 2008 | Posted in programming | 2 Comments
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 [...]
September 25th, 2008 | Posted in programming, twisted integration | 1 Comment