First of all you need to install python 2.2.2 on your machine. It can be downloaded at http://www.python.org/download/releases/2.2.2/

I kept the installation folder by default (C:\>Python22) in order not to interfere with my current Python 2.5 installation (installed in C:\>Python).

Then

  • go to C:\Python22>
  • type python and you should have the following output:
Python 2.2.2 (#37, Oct 14 2002, 17:02:34) \[MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

All you have left to do is:

import compileall
 
compileall.compile_dir("myLibDirectory", force=1)