/[thuban]/branches/WIP-pyshapelib-bramz/test/test_save.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/test/test_save.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 494 by jonathan, Mon Mar 10 10:45:33 2003 UTC revision 530 by jonathan, Wed Mar 12 19:58:00 2003 UTC
# Line 19  from StringIO import StringIO Line 19  from StringIO import StringIO
19    
20  import xml.sax  import xml.sax
21  import xml.sax.handler  import xml.sax.handler
22  from xml.sax import make_parser, ErrorHandler  from xml.sax import make_parser, ErrorHandler, SAXNotRecognizedException
23    
24  import support  import support
25  support.initthuban()  support.initthuban()
# Line 54  def sax_eventlist(data): Line 54  def sax_eventlist(data):
54      parser.setErrorHandler(ErrorHandler())      parser.setErrorHandler(ErrorHandler())
55      parser.setFeature(xml.sax.handler.feature_namespaces, 1)      parser.setFeature(xml.sax.handler.feature_namespaces, 1)
56    
57        #
58        # see comment at the end of Thuban/Model/load.py
59        #
60        try:
61            parser.setFeature(xml.sax.handler.feature_validation, 0)
62            parser.setFeature(xml.sax.handler.feature_external_ges, 0)
63            parser.setFeature(xml.sax.handler.feature_external_pes, 0)
64        except SAXNotRecognizedException:
65            pass
66    
67      inpsrc = xml.sax.InputSource()      inpsrc = xml.sax.InputSource()
68      inpsrc.setByteStream(StringIO(data))      inpsrc.setByteStream(StringIO(data))
69      parser.parse(inpsrc)      parser.parse(inpsrc)

Legend:
Removed from v.494  
changed lines
  Added in v.530

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26