crc32 in Python

July 10, 2007
from zlib import crc32

Python: Why to assign functions’ return values to dummy variables

May 12, 2007

In response to Kototama’s comment in the previous post:

There is a need, when running directly under the interpreter (code placed in the global namespace, not inside a function or method), to assign the return value of any function to a dummy variable.

Read the rest of this entry »

Python tricks: “Press Enter to exit” on unhandled exception

May 5, 2007

When I write Python scripts on Windows, I often write a main() function, and when it throws an exception I don't handle, the console window closes immediately before giving me a chance to look at the traceback.

Read the rest of this entry »

Writing matrix-style scripts

May 5, 2007

I like to write what I call “matrix-style scripts” – those are scripts that work in a command line window, get a few parameters at first and then just start running, filling the screen with text as they go along, like in The Matrix (or in Hollywood productions in general).

Read the rest of this entry »

Photo gallery on a restricted server

May 2, 2007

In this post, I’ll take you through my latest personal project – building a dynamic photo gallery. (The gallery existed before, but it was static HTML created by long nights of copying and pasting in Notepad.)
Read the rest of this entry »