Archive for the 'Python' Category

Digging into Python’s PYC files

Friday, January 25th, 2008

One of the first things we needed to do when we started working on Testuff, was to figure out how are we going to update the installed desktop clients. This is one of those problems that seems to usually fall under the NIH syndrome, and like many others before me, I invented my own scheme. [...]

A simple lexer in Python

Sunday, October 21st, 2007

I’m taking a course on building compilers at the Israeli Open University and just learned how to use flex. It occurred to me that building a simple lexical analyzer should be quite easy with Python’s re module. A typical lexical analyzer read a stream of text input and splits it into a list of tokens. [...]

Building M2Crypto on Windows

Tuesday, September 25th, 2007

Here’s another installment in what seems to be turning into a series of compilation instructions for Windows of libraries that were born and raised on Linux.
Python has only the most basic support for secure SSL and HTTPS and if you know anything about how SSL works, you’ll know that support doesn’t provide enough security. I’ll leave the [...]

YouTube runs on Python

Thursday, August 23rd, 2007

I love Python, I really do. It has clear syntax, a nice library support and I feel very productive using it.
But Python is an interpreted language and it’s slow. You don’t feel it until you do something stupid like going through all the pixels in a bitmap and converting them into gray scale. I tried [...]

Tracking down rogue print statements

Wednesday, February 7th, 2007

I’ve spend the last hour hunting for a rogue print somewhere in my code. I almost never use a debugger these days, relying almost exclusively on debug prints. Python makes it easy and Scite makes that even easier. That habit has just bit me in the ass. Like I said, I spend the last hour [...]

My wxPython code

Thursday, January 25th, 2007

It’s been a year now since I’ve started using Python and wxPython and it has been a wonderful experience. What I didn’t realize until now was how much useful code I’ve written during this time, code that could be useful to others as well.
I’ve decided to put up a page here, with all the modules, [...]