def update_device_list(self): for root, dirs, files in os.walk('.\\pyastra\\ports\\pic14\\procs'): for name in files: device = str(name) if device[:1]=='1' and device.find('.pyc')<0 and device.find('i')<0: device = device[:device.find('.')] self.device_cbox.addItem('pic'+device) self.device_cbox.setCurrentIndex(127) # initially set to PIC16F876A

note: Python programming language is really NOT intended for platform/devices with very limited resources, such a microcontroller with a very small memory. For now, C language is still the widely used in microcontroller programming.