Edgewall Software

Opened 18 years ago

Closed 18 years ago

#69 closed enhancement (fixed)

Allow Streams as source in MarkupTemplate constructor

Reported by: David Fraser <davidf@…> Owned by: cmlenz
Priority: major Milestone: 0.4
Component: Parsing Version: 0.3.3
Keywords: Cc: davidf@…

Description

Currently the source argument to a Template has to be a string or filetype. However I would like to be able to pass a Stream, since I am using Genshi streams to do some preprocessing of the template itself (not just arguments to the template).

For MarkupTemplate?, this turns out to be simple: in _parse, if self.source is a stream, simply use it instead of running XMLParser on it.

Have a patch to attach and then we can discuss whether this is a good idea or not.

Attachments (1)

markuptemplate-stream-source.patch (804 bytes) - added by David Fraser <davidf@…> 18 years ago.
simple patch to allow a Stream source argument to MarkupTemplate?

Download all attachments as: .zip

Change History (2)

Changed 18 years ago by David Fraser <davidf@…>

simple patch to allow a Stream source argument to MarkupTemplate?

comment:1 Changed 18 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from new to closed

Applied in [456].

Note: See TracTickets for help on using tickets.