serial reader and writer for python using pyserial