|
Yes, 'tis easy
Hi Davidfrank,
Yes this is an easy one, but you were along the right lines at the end of the post anyway - you were almost there!
You're going to have to speak to your sysadmin to make a one line change in his httpd.conf for this apache instance.
Basically there's a line says "AllowOverride None" - get him to delete that and do a reload of apache, then your .htaccess should take effect, the important bits in there is the +ExecCGI and the AddHandler cgi-script .py - this ensures that any .py files in the current directory will be run through whatever's specified on the shebang line (#! at the top).
For this to work, you'll go with your first approach, creating trial.py and putting your python code in there. The second approach (create a .html with some script tags in) won't work here.
Hope this helps,
Craig
|