Re: how to run python scripts on a website
- From: James Stroud <jstroud@xxxxxxxx>
- Date: Sat, 21 Jan 2006 19:42:37 -0800
py wrote:
i have a website which runs apache on linux. it supports python (i think via cgi....not sure how else). anyway how can I go to a web page and run a python script or something like that? for example say i make a script which prints out all the links on another URL....how can i run that?
thanks!
Here is a start. Put the following in your cgi-bin folder or equivalent. Name it test.cgi
#!/usr/bin/python
print "Content-Type: text/plain\n\n" print "Hello, World!\n"
Now just browse it. E.g.:
http://www.doe-mbi.ucla.edu/cgi/jstroud/ex-1.1.cgi
James .
- References:
- Prev by Date: how to run python scripts on a website
- Next by Date: Re: Regular expressions: recursive patterns and callouts
- Previous by thread: how to run python scripts on a website
- Next by thread: Re: how to run python scripts on a website
- Index(es):