An experimental release of PyMaemo is available for SDK 4.0. To use it just include these lines in your /etc/apt/sources.list file and disable ALL repositories remaining:
http://repository.maemo.org bora free non-free
http://repository.maemo.org/extras sardine free non-free
To install use 'apt-get update' then 'apt-get install python2.5-runtime' as root inside your device.