Start of python side of serial code