コード例 #1
0
ファイル: components.py プロジェクト: karlp/eagle-automation
    def build_bom(self, bom_path):
        sch = pyeagle.open(bom_path)
        parts = dict()

        for name, part in sch.parts.items():
            attr_dict = part.device.technologies[part.technology].as_dict()
            attr_dict.update(part.attributes)
            part_line = self.get_part_line(part, attr_dict)

            parts.setdefault(hash(part_line), part_line).insert(part.name)

        return parts.values()
コード例 #2
0
    def build_bom(self, bom_path):
        sch = pyeagle.open(bom_path)
        parts = dict()

        for name, part in sch.parts.items():
            attr_dict = part.device.technologies[part.technology].as_dict()
            attr_dict.update(part.attributes)
            part_line = self.get_part_line(part, attr_dict)

            parts.setdefault(hash(part_line), part_line).insert(part.name)

        return parts.values()
コード例 #3
0
ファイル: test_svg.py プロジェクト: Justin318/pyeagle
 def setUpClass(cls):
     cls.lib = pyeagle.open(os.path.join(data, 'sample.lbr'))
コード例 #4
0
ファイル: test_open.py プロジェクト: guyzmo/pyeagle
 def setUpClass(cls):
     cls.schematic = cls.obj = \
         pyeagle.open(os.path.join(data, 'sample.sch'))
コード例 #5
0
ファイル: test_open.py プロジェクト: guyzmo/pyeagle
 def setUpClass(cls):
     cls.lib = cls.obj = pyeagle.open(os.path.join(data, 'sample.lbr'))
コード例 #6
0
ファイル: test_open.py プロジェクト: guyzmo/pyeagle
 def test_valid_xml(self):
     with self.assertRaises(NotImplementedError):
         pyeagle.open(os.path.join(data, 'valid-xml-but-bad-file.xml'))
コード例 #7
0
ファイル: test_open.py プロジェクト: guyzmo/pyeagle
 def setUpClass(cls):
     cls.board = cls.obj = pyeagle.open(os.path.join(data, 'sample.brd'))
コード例 #8
0
 def setUpClass(cls):
     cls.board = cls.obj = pyeagle.open(os.path.join(data, 'sample.brd'))
コード例 #9
0
 def setUpClass(cls):
     cls.schematic = cls.obj = \
         pyeagle.open(os.path.join(data, 'sample.sch'))
コード例 #10
0
 def test_valid_xml(self):
     with self.assertRaises(NotImplementedError):
         pyeagle.open(os.path.join(data, 'valid-xml-but-bad-file.xml'))
コード例 #11
0
def diff_semantic(from_file, to_file):
    # make a list of packages first, and immediately output for/against
    libf = pyeagle.open(from_file)
    libt = pyeagle.open(to_file)
    diff_packages(libf, libt)
    diff_devices(libf, libt)
コード例 #12
0
ファイル: diff.py プロジェクト: guyzmo/eagle-automation
def diff_semantic(from_file, to_file):
    # make a list of packages first, and immediately output for/against
    libf = pyeagle.open(from_file)
    libt = pyeagle.open(to_file)
    diff_packages(libf, libt)
    diff_devices(libf, libt)