Re: pyblosxom 3000

Steven Armstrong <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
Bill Mill wrote:
<snip>
 >
 > 3) Unit tests - I've never written unit tests, nor do I know how one
 > would test such an application as pyblosxom. Anyone want to step up?
 >

I've also been thinking about this and have a few ideas. I'll try to 
wrap them up in code and post them.

> 
> 4) Contrib stuff - Will's still asking for a contrib maintainer. I
> can't reliably concentrate on anything for more than 5 minutes, so I
> don't want to volunteer. Anyone?

As I'm not working fulltime atm and therefore have enough free time I 
guess I could do this. Can someone describe what exactly the contrib 
maintainer is supposed to do?

> 
> 5) Comment Administrator - I have one that works, more or less, except
> it can't change the dates on comments. This is because I want to
> change the comments module to use the date field inside the comments
> file instead of the time embedded in the filename.

Cool, I was thinking about hacking something like that together. 
Courious how you did it.

<snip>
> 
> 7) mod_python / WSGI integration - Didn't somebody submit a patch/some
> patches that do this? Are we going to try and integrate it for 1.2? I
> think it's a good idea.
> 
> A quick search shows
> http://sourceforge.net/mailarchive/message.php?msg_id=10250388 .
> Steven, you still hanging around here? Want to step up for the effort
> to patch it in?
> 
> I'd like to start running this on my personal blog.

Yeah, I'm still here ;-)
A few issues/thoughts I bumped into while implementing the 
WSGI/mod_python stuff:

There are quit a few modules/plugins that directly access sys.stdin and 
sys.stdout. This turned out to be a problem for the WSGI/mod_python 
approach.
For example, mod_python requires the content-type to be set in a special 
way on the mod_python request instance. If a module/plugin writes it 
directly to sys.stdout it messes up everything. Similar if a 
module/plugin reads directly from sys.stdin.

Another problem I had was with how the outputstream/renderer stuff 
works. For example in my nospam plugin I implemented the cb_handle 
callback to generate and write out the human-verification-image.
As the renderer is not set at this stage, the only way to add headers 
and write data was to directly use stdout. This again fucked up mod_python.

I think it would be a good idea to split the outputstream handling from 
the renderer. Let the renderer generate the content and use a seperat 
object to handle all output related stuff (e.g. add headers and write 
the response).

Something like:
response = request.getResponse()
response.addHeader('Content-Type', 'text/plain')
response.write("Hello World")

Can we change PyBlosxom to work like this? Would make my life easier.

cheers
Steven


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
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.