Forcing Python to detect DocumentRoot

Joel Goldstick joel.goldstick at gmail.com
Fri Jan 18 14:11:43 EST 2013


On Fri, Jan 18, 2013 at 1:58 PM, Ferrous Cranus <nikos.gr33k at gmail.com>wrote:

> Τη Παρασκευή, 18 Ιανουαρίου 2013 3:28:10 μ.μ. UTC+2, ο χρήστης Joel
> Goldstick έγραψε:
>
> > DocumentRoot = os.environ['HOME'] + 'public_html'
>
> Yes, iam using this and it works.
> One last thing:
>
> my python script file is located at
> /home/nikos/public_html/addon_domain/cgi-bin/
>
> How python is able to run the following statement?
>
> f = open( '/home/nikos/public_html/' + page )
>
> which is clearly levels up of addon domain's DocumentRoot?
> --
> http://mail.python.org/mailman/listinfo/python-list
>

My website experience with python has been using mod wsgi (and django), not
cgi.  I can't help you with how to configure cgi, but googling python cgi
might help

-- 
Joel Goldstick
http://joelgoldstick.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130118/ea354ff4/attachment.html>


More information about the Python-list mailing list