Beispiel #1
0
def get_dom(filename):
    if filename not in _cache:
        design = get_design(filename)
        eaglexml = EagleXML()
        for ci in design.component_instances:
            eaglexml.inst2cpt[ci.instance_id] = ci.library_id
        _cache[filename] = eaglexml.make_dom(design)
    return _cache[filename]
def get_dom(filename):
    if filename not in _cache:
        design = get_design(filename)
        eaglexml = EagleXML()
        for ci in design.component_instances:
            eaglexml.inst2cpt[ci.instance_id] = ci.library_id
        _cache[filename] = eaglexml.make_dom(design)
    return _cache[filename]
Beispiel #3
0
    def test_write(self):
        """
        We can write out a complete design file.
        """

        writer = EagleXML()
        filedesc, filename = tempfile.mkstemp()
        os.close(filedesc)
        os.remove(filename)
        writer.write(self.design, filename)
        self.assertTrue(os.path.exists(filename))
        os.remove(filename)
    def test_write(self):
        """
        We can write out a complete design file.
        """

        writer = EagleXML()
        filedesc, filename = tempfile.mkstemp()
        os.close(filedesc)
        os.remove(filename)
        writer.write(self.design, filename)
        self.assertTrue(os.path.exists(filename))
        os.remove(filename)