python version, still too slow

Signed-off-by: Mattias Andrée <maandree@operamail.com>