questions/thoughts on config.py
Steven Armstrong <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Hellau
What do you think about adding a 'blog_home' property to config.py?
py['blog_home'] = "/path/to/weblog"
After that one could write additional dir related props like:
py['datadir'] = py['blog_home']+"/data"
py['flavourdir'] = py['blog_home']+"/flavours"
py['logdir'] = py['blog_home']+"/logs"
py['plugin_dirs'] = [py['blog_home']+"/plugins"]
...
Also, as some plugins require additional non-standard modules (like
'xmlrpc_pingback' which uses 'feedparser') I was thinking on where to
put those. How do you folks handle this?
Would something like:
py["codelibs"] = [py['blog_home']+"/lib", "/some/other/funky/libdir"]
and then in PyBlosxom.__init__:
if config.has_key("codelibs"):
sys.path.reverse()
config["codelibs"].reverse()
sys.path.extend(config["codelibs"])
sys.path.reverse()
be a good idea?
cheers
Steven
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click