[Moin-devel] Formatter Troubles
Tim Bird
tbird20d at yahoo.com
Tue Oct 15 16:43:01 EDT 2002
--- Lele Gaifax <lele at seldati.it> wrote:
> >>>>> On 15 Oct 2002 15:11:03 -0500, Ken Kinder
> <kkinder at rackspace.com> said:
>
> KK> So, the problem is, I have text like
>
> KK> foo *bar*
>
> KK> What I get is:
>
> KK> <strong></strong>foo bar
>
> KK> Through debug variables, I've absolutely confirmed that
> strong
> KK> is called to open and close before "bar" is sent to
> rawtext.
>
> KK> Why might this be? Are there any other pitfalls you can
> think
> KK> of that are going to continue to bite me as a struggle
> mapping
> KK> the way formatters work to the way building an XML file via
> KK> DOM work?
>
> This is the same thing that happens, in some circumstances, under
> PyApache. I guess it has something to do with the way moin emits
> its
> text, some time using sys.stdout.write, some time using print
> statements: some parts of moin replace sys.stdout to get the output
> of
> "subparts" (macros for example).
>
> I've spent some time to track the problem, with out luck.
I'm just guessing, but maybe you need to flush whatever you're
writing to, right after your write:
sys.stdout.flush()
With all the streams being replaced and substituted, I wouldn't
be at all surprised to see stuff left in output buffers and not
making to the network socket in program write order.
Tim Bird
__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
More information about the Moin-devel
mailing list