welcome to the world of…

Looks like a small bulb used to indicate something unusual, like a malfunction.

Python setup.py to DEB package

Filed under: Uncategorized — Tags: , , , , , , , — admin @ 2011-05-13 10:29

From time to time I hit an interesting Python package which is not available in a DEB package. Setup.py/distutils/setuptools are de facto standard but the base binary distribution command set includes only RPM support. I don’t like python setup.py install. I prefer full installation/purging control via Ubuntu package system. Solution is easy.

Install package python-stdeb and then execute

python setup.py --command-packages=stdeb.command bdist_deb

And your DEB is ready! More information.

Transition to FastCGI

Filed under: Uncategorized — Tags: , , , , , , , , — admin @ 2009-05-08 17:36

Apache’s prefork MPM is a very heavy memory eater. Thirty instances together with PostgreSQL can consume more then 1.5GB of memory. I have already managed the PostgreSQL to become modest. Now the Apache is the target.

(more…)

Memoization

Filed under: Uncategorized — Tags: , , , , — admin @ 2009-03-18 12:56

I presume that you know what the memoization is. And if not then you can read about it on wikipedia. I’d like to write about problems that I ran into while implementing memoization in Python.

(more…)

Function in a function, scope, decorators

Filed under: Uncategorized — Tags: , , , , — admin @ 2009-03-16 17:20

When I started using decorators I was confused how it works. I was using decorators like @staticmethod and @classmethod and I didn’t care how it is done. It works. But what about custom decorators? (more…)

Python’s built-in id() and class methods

Filed under: Uncategorized — Tags: , , , — admin @ 2009-02-24 18:47

I found a feature of the built-in function id() that is a little bit unexpected (Python 2.5).

(more…)

mod_python vs. FastCGI

Filed under: Uncategorized — Tags: , , — admin @ 2009-01-24 12:19

I’m developing webapplications running under mod_python for a long time. I’m not very satisfied with the mod_python performance particularly the first load time so I’m looking for something like an application server – loaded modules will stay “longer” in the memory – application doesn’t need to be completely initialized very often. The FastCGI approach is very close. I ran benchmarks to measure overhead of the FastCGI (mod_fastcgi, mod_fcgid) compared to the mod_python. (more…)