예제 #1
0
 def begin(self):
     if self.config.dst.endswith(".bz2"):
         output = bz2.BZ2File(self.config.dst, "w")
     else:
         output = open(self.config.dst, "w")
     self.outxml = OsmSax.OsmSaxWriter(output, "UTF-8")
     self.outxml.startDocument()
     self.outxml.startElement("analysers", {})
예제 #2
0
 def begin(self):
     if self.config.dst.endswith(".bz2"):
         output = bz2.BZ2File(self.config.dst, "w")
     else:
         output = open(self.config.dst, "w")
     self.outxml = OsmSax.OsmSaxWriter(output, "UTF-8")
     self.outxml.startDocument()
     self.outxml.startElement(
         "analysers",
         {"timestamp": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())})