1. Martin Vejnár
  2. pyeagle

Commits

Martin Vejnár  committed 450d58b

Added parser.safe_parse_schematic.

  • Participants
  • Parent commits 5157e6c
  • Branches default

Comments (0)

Files changed (1)

File parser.py

View file
  • Ignore whitespace
     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)