You need to put your scripts into folder [ public_html/cgi-bin ]
OR in file [ .htaccess ] add this line [ AddHandler cgi-script .pl ] in folder [ public_html ]
be sure and set permission for your script file to [ 0750 ]
have the very first line of your script with the hashbang of [ #!/usr/local/bin/python ]