Ejemplo n.º 1
0
def getDrawing(InputFile, GrabBlocks):
    try:
        InputString = unicode(open(InputFile).read().decode('utf-8'))
    except:
        sys.exit(0)
    InputStream = StringIO(InputString)
    options = {'grab_blocks': GrabBlocks}
    return Drawing(InputStream, options)
Ejemplo n.º 2
0
 def setUp(self):
     stream = StringIO(DXF13)
     options = {'grab_blocks': False}
     self.dwg = Drawing(stream, options)
Ejemplo n.º 3
0
 def setUp(self):
     stream = StringIO(MINIMALISTIC_DXF12)
     options = {'grab_blocks': True}
     self.dwg = Drawing(stream, options)