simple hdlc for python