Newbie : Installing Python locally in acct on shared server

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Sun Dec 2 19:07:04 EST 2001


Ahh... I just realized you aren't giving the web server 
the correct headers.  Try this:

--------------------------------------------
#!/home/luser/bin/python

import sys

print "Content-type: text/plain\n"
 
print "path has", len(sys.path), "members"
--------------------------------------------

and let me know what happens...


----- Original Message ----- 
From: "brian donovan" <usenet at lophty.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Sunday, December 02, 2001 10:30 AM
Subject: Re: Newbie : Installing Python locally in acct on shared server


> Hi Chris,
> 
> Yes, the below should work, but it doesn't. :(  I just did the steps as 
> outlined below and I'm getting the same bizarre result as previously.  A 
> helloworld script composed of a few print statements and ointed at my 
> install executes without a hitch, but importing a module causes a "500 
> Internal Server Error".  :/
> 
> I tested with a number of extremely simple scripts using different 
> modules.  An example :
> 
> 
> ---------------------------------
> #!/home/luser/bin/python
> 
> import sys
> 
> print "path has", len(sys.path), "members"
> ---------------------------------
> 
> another
> 
> ---------------------------------
> #!/home/luser/bin/python
> 
> import base64
> 
> MESSAGE = "life of brian"
> data = base64.encodestring(MESSAGE)
> 
> original_data = base64.decodestring(data)
> 
> print "original : ", repr(MESSAGE)
> print "encoded data : ", repr(data)
> print "decoded data : ", repr(original_data)
> ---------------------------------
> 
> 
> Any ideas?  The installation went off seemingly without a hitch.  and 
> everything seems to physically be "there", but scripts that import a 
> module die.
> 
> -brian
> 
> Chris Gonnerman wrote:
> 
> > HMMMM...
> > 
> > First, I'd recommend 
> > 
> >     ./configure --prefix=/home/luser
> >     make
> >     make test
> >     make install
> > 
> > Make sure any script you write has
> > 
> >     #!/home/luser/bin/python
> > 
> > at the top.
> > 
> > This really should work...
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 
> 





More information about the Python-list mailing list