INNER CODE UNIT · Python
print_devices
xoseperez/espurna · code/ota.py:144
def print_devices(self, devices=None):
if not devices:
devices = self.devices
self.printer.devices(devices)
def get_boards():
"""
Grabs board types from hardware.h file
"""
boards = []
for line in open("espurna/config/hardware.h"):
match = re.search(r"^#elif defined\((\w*)\)", line)
if match:
boards.append(match.group(1))
return sorted(boards)