Re: questions/thoughts on config.py

will guaraldi <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
On Sat, 12 Feb 2005, Steven Armstrong wrote:
>
> 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"]
> ...

We don't need to force that on our users.  If they want to do that sort of 
thing, they're better off with something like this (which I use in my 
config.py file):

main = "/path/to/weblog"

py['datadir'] = main + "/data"
py['flavourdir'] = main + "/flavours"
py['logdir'] = main + "/logs"
py['plugin_dirs'] = [ main + "/plugins" ]

The config.py file is a Python file.  People can use Python to organize it 
as they so choose.  Beyond that, I'd prefer to keep the config.py file we 
give out as simple as possible.  The fewer variables we have to document, 
the better.

So, I'm -1 on this.


> 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?

I'm -1 on this as well.  I understand the issue you're bringing up, but 
don't think it makes sense for us to introduce this sort of thing at this 
point.  We've had the xmlrpc_pingback module for a long time now and no 
one's mentioned anything like this before.  So I'm thinking that while 
it's something to think about, I don't think it's a problem we need to 
solve.

Anyone else want to chime in?

/will


-------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.