Close

Python Configuration Library

A project log for PD Buddy Sink

Smart power jack for USB Power Delivery

clara-hobbsClara Hobbs 05/11/2017 at 22:140 Comments

Looking over the GUI code recently, I realized what a mess it was. This was partially because of the cobbled-together way it communicated with the PD Buddy Sink. I decided to make a better interface for configuring the Sink from Python code. It made sense to do that as a separate Python package, mostly because I might want to write a GUI with some other library for better portability than GTK+ offers. After a day or so of writing the library and accompanying unit tests, I made the first release of pd-buddy-python.

The GTK+ GUI now uses this library rather than pySerial for communication with the Sink. Several portions of code were greatly simplified in the process, notably configuration loading and testing if the "Save" button should be visible. I'm very happy with the new library, and all the possibilities it opens. Expect a more portable configuration interface soon!

Discussions