Commits

Martin Vejnár committed 450d58b

Added parser.safe_parse_schematic.

Comments (0)

Files changed (1)

     for layer in sch.layers:
         sch.layer_map[layer.number] = layer
 
+def safe_parse_schematic(fin, **kw):
+    import cStringIO
+    return parse_schematic(cStringIO.StringIO(fin.read()), **kw)
+
 def parse_schematic(fin, **kw):
     if fin.read(5) == '<?xml':
         fin.seek(0)