Thanks for your replay. I put the handler code at the end of the file. No error! But if I go to my localhost\project\mptest.py The code of my function appears. I solve this by put the following code in the confige file:
<Directory ..........> AllowOverride FileInfo </Directory> -- http://mail.python.org/mailman/listinfo/python-list