Help: stuck on first example!

Wayne Pierce wayne at mishre.com
Mon Feb 11 18:34:08 EST 2002


I haven't used Xitami in a while, but IIRC I had some problems with it 
when I had the first line on a Windows based system.  Try remving the 
first line and testing it.  I don't think it should matter, technically, 
since it's a comment...but it used to.  Mind you it's been about 2 years 
since I've worked with Xitami...

Do you have .py and .pyc files associated within Xitami to launch the 
Python interpreter?  Just having .py files won't necessarily work, since 
you will be using .pyc files after the first run.

Flavian Hardcastle wrote:
> The example at http://www.devshed.com/Server_Side/Python/CGI/page3.html is 
> supposed to produce the text in my browser "Hello, Python", but it doesn't 
> do a thing.
> 
> Instead, using the Xitami personal server, I get the error 
> 
> 
>>Internal error: your request was unsuccessful
>>Cannot create CGI process - program not found
>>
> 
> Here is the text of the example...
> 
> #!/usr/bin/python
> 
> # Tell the browser how to render the text
> print "Content-Type: text/plain\n\n"
> 
> print "Hello, Python!"  # print a test string
> 
> 
> I had a theory that the first line was the problem. The tut says that it's 
> used by Unix and Linux servers to tell the OS to initiate Python. I'm using 
> Win98, btw. I tried changing it to the following......
> 
> 
>>#path = c:/Python22/Python.exe
>>
> 
> and then directing to the file location on my HD ...
> 
> 
>>#path = d:/Docs/Web/cgi-bin/index.py
>>
> 
> ... but in both cases the browser merely gave me the option of downloading 
> the file, or opening it using Python.
> 
> So what am I missing? 
> 


-- 
Wayne Pierce
web: http://www.mishre.com
email: wayne at mishre.com

"What you need to know."





More information about the Python-list mailing list