A patch to make __private names _no_so_private
Oleg Broytmann <[email protected]> Mon, 4 Oct 2004 19:28:29 +0400
| Newsgroups | gmane.comp.web.ht2html.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello! I am new here, but not new to Python.
I am going to try to use ht2html to generate a small static site from
templates. I need to override many methods in Skeleton/Sidebar, but I
cannot - they are mangled because they are __private.
So here is the patch to fix it:
https://sourceforge.net/tracker/index.php?func=detail&aid=1039985&group_id=46757&atid=447267
The patch makes private names no so private. I renamed almost all
__vars to _vars (with some exception, most notably LinkFixer, because
there are rootdir/relthis/myurl accessors), and all __method_names to
_method_names.
The patch is against the CVS version.
Any opinion? objection?
I'd like to provide a test case, but I cannot even start without this
patch, because Skeleton._do_head() inserts timestamps in the HTML
header, which is a nuisance.
PS. Also I am considering other approaches. I've tried Website DocBook
stylesheet and found that 4Suite is too weak to handle it... may be I'll
try libxml2 later. Also I think I can create a "master" site using a
dynamic framework (Quixote, Zope, etc.) and use wget to generate a
static copy; this approach seems a bit overkill for me, because it
recreates the entire site with wget, where with ht2html I can update
only those files whose templates was changed. If anyone has an opinion
on this or other approaches - please don't hesitate to tell me.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [email protected]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl