From: Jonathan E. <jon...@ca...> - 2006-01-18 16:37:07
|
On Tue, 17 Jan 2006 15:41:03 -0800 (PST), "Ryan Bowman" <rya...@ya...> said: > I have signed up for a shared hosting service that allows python to be > executed > as cgi. I can run .py files and they'll be executed, so I can visit a > file in > a browser, say hello.py > > #!/usr/bin/python > print '<h1>Hello</h1>' > > and get <h1>Hello</h1> output to the browser. That's nice, but I want to > use > Spyce. > > Following the 'Alternate CGI Config' instructions at > http://spyce.sourceforge.net/docs/doc-conf_source.html I'm trying to run > a > simple test, the one on spyce's home page, hello.spy: > > #!/usr/bin/python /home/ryanlb/spyce/run_spyceCGI.py > <spy:parent title="Hello" /> > [[ import spyce ]] > > Hello from Spyce version > [[= spyce.__version__ ]]! > > With the following directory structure: > ~/spyce/ > ~/ryanlb.com/ > > If I put hello.spy in ryanlb.com and visit it with a browser it displays > code > rather than running it. > If I run ./hello.spy from the command line it runs spyce and dumps the > generated html code to the console, as expected. > So, am I doing something wrong, or is Dreamhost doing something so I > can't run > spyce via cgi? Typically shared hosts configure CGI to be allowed to run from a specific directory, e.g., ~/cgi-bin. That is probably what is going on here. -Jonathan -- C++ is history repeated as tragedy. Java is history repeated as farce. --Scott McKay |