Try 2.5 to 1 for the main .c file. The Python stuff has unit tests as well.

The main difference is functionality: the Python version does that much more.

1) Python stored procs have a global and session level data area that is preserved across calls.
2) Perl functions cannot be used as triggers; Python functions can, and they have a trigger-related data area as well.
3) You can create and use execution plans.

and unrelated to code size:
4) The documentation is a helluva lot better for the Python version. :-)