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)
Change History (2)
Changed 18 years ago by David Fraser <davidf@…>
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.
simple patch to allow a Stream source argument to MarkupTemplate?