M
Mardy
Hi,
I've built a small project (http://eligante.sf.net) which I'm actually
trying to package using distutils.
The directory structure is going to be like this:
eligante/
eligante.py
sitobase.py
personas.py
[...other python files...]
modulos/
mbox.py
gaim.py
[...other python files...]
web/
indice.py
cerca.py
[...other python files...]
stylo.css
testata.html
[and maybe, in the future, other HTML files]
The python files in the eligante/web directory are intended to be called
by a webserver (now Apache, but soon I'll switch to the python
module CGIHTTPServer for simplicity) as CGIs. Currently, these CGIs read
the testata.html file and use it as the beginning of their output, while
the style.css is served by the HTTP server.
However, I don't know if this directory layout is suitable for
site-packages, since at a first glance it looks to me that datafiles might
not be welcome under it. Is it so?
In that case, where should I move the .html files, and how should I access
them from inside python?
If, on the other hand, this layout is OK for site-packages, how do I
instruct distutils to put the .html and .css files under the eligante/web
directory?
Sorry for the long post, and thanks in advance for any help or suggestion.
I've built a small project (http://eligante.sf.net) which I'm actually
trying to package using distutils.
The directory structure is going to be like this:
eligante/
eligante.py
sitobase.py
personas.py
[...other python files...]
modulos/
mbox.py
gaim.py
[...other python files...]
web/
indice.py
cerca.py
[...other python files...]
stylo.css
testata.html
[and maybe, in the future, other HTML files]
The python files in the eligante/web directory are intended to be called
by a webserver (now Apache, but soon I'll switch to the python
module CGIHTTPServer for simplicity) as CGIs. Currently, these CGIs read
the testata.html file and use it as the beginning of their output, while
the style.css is served by the HTTP server.
However, I don't know if this directory layout is suitable for
site-packages, since at a first glance it looks to me that datafiles might
not be welcome under it. Is it so?
In that case, where should I move the .html files, and how should I access
them from inside python?
If, on the other hand, this layout is OK for site-packages, how do I
instruct distutils to put the .html and .css files under the eligante/web
directory?
Sorry for the long post, and thanks in advance for any help or suggestion.