I want to use pyserial to control Ubuntu OS reboot and I need to get and read the information until to the login in the txt.
I use this code:
logging.basicConfig(filename='onoff.txt',format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
logging.warning(ser.readline())
But the ser.readline in the txt only have the one line , I need all information in the txt.
Is it possible read all information and write in the txt file?
Thanks!!