finding domain name

Bobby Roberts tchendrix at
Tue Sep 23 22:45:06 CEST 2008

On Sep 23, 1:23 pm, Bruno Desthuilliers
<bdesth.quelquech... at> wrote:
> Bobby Roberts a écrit :
> > hi group.  I'm new to python and need some help and hope you can
> > answer this question.  I have a situation in my code where i need to
> > create a file on the server and write to it.  That's not a problem if
> > i hard code the path.  However, the domain name needs to be dynamic so
> > it is picked up automatically.  The path to our websites is
> > home/sites/xxxxx/
> > where xxxxx represents the domain name.
> > How can I find the domain name of the current url being viewed.
> What are you using exactly ? cgi ? wsgi ? Else ?

mod python over an in-house framework written years ago without
documentation so it's not the easiest thing to navigate.  We will be
moving to django this fall.

More information about the Python-list mailing list