Re: pyblosxom 3000

Bill Mill <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
Sounds good to me. It's definitely cleaner to send data out through
the response object than it is through sys.stdout, if you ask me.

Question for you, since you've been digging through the headers code.
If you can answer it off the top of your head, cool, if not, no
problem. Why are my blog pages sent with a utf-8 encoding? is that
done automatically by Apache? Does pyblosxom do this (grep suggests it
does not)? Does apache add headers to the output besides what
pyblosxom is sending out?

Peace
Bill Mill
bill.mill at gmail.com

On Thu, 20 Jan 2005 03:52:47 +0100, Steven Armstrong <[email protected]> wrote:
> Hi all
> 
> I've sucessfully patched in the inputstream/outputstream stuff.
> 
> Before I go any further I wanted to ask you all a few questions
> regarding API changes for 1.2. Some of this is redundant with stuff I
> previously posted, sorry for that.
> 
> Here are the changes I'ld like to propose:
> 
> Application startup (pyblosxom.cgi):
> p = PyBlosxom(config, environ) # environ becomes ._http
> # static
> p.runStaticRenderer(incremental)
> # test
> p.testInstallation()
> # cgi
> p.run()
> response = p.getResponse()
> response.sendHeaders(sys.stdout)
> response.sendBody(sys.stdout)
> 
> The response stuff in the #cgi part is required since mod_python and
> twisted handle this part differently, hence p.run() should not write
> headers or data directly.
> 
> Outputstream (pyblosxom.py):
> response = request.getResponse()
> response.addHeader('Content-Type', 'text/plain')
> response.write("Hello World")
> response.writelines(["whatever", "you", "want"])
> 
> 
> Renderer (base.py):
> rewrite showHeaders to call addHeader on the response instead of writing
> to stdout.
> 
> Inputstream (pyblosxom.py):
> infile = request.read()
> infilepart = request.read(1024)
> inline = request.readline()
> inlines = request.readlines()
> 
> 
> Form handling (pyblosxom.py):
> form = request.getForm()
> 
> This allows a lazy approach for calling cgi.FieldStorage.
> My problem with the current form handling is that the inputstream is
> consumed by cgi.FieldStorage, whether a form is actually used anywhere
> in the callback chain or not.
> 
> And when my poor plugin want's to read some xml which a client app has
> sent there's nothing left to read from.
> I believe this may also solve the problem Richard Chamberlain described
> in his mail "xmlrpc_metaweblog.py problem" to the pyblosxom-users
> mailing list.
> 
> This can be made backwards compatible if necessary.
> 
> That's about it. It's actually allready coded. If you think that all
> sounds good I'll send in a patch.
> 
> Concerns? Ideas?
> 
> cheers
> Steven
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Pyblosxom-devel mailing list
> Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel
>


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
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.