I\'m trying to write an App that uses serial ports in a Linux PC, using python and PySerial. But in this PC there are other Apps using serial ports. How can I know if a port is
Seems to be badly documented on the PySerial website, this works for me:
ser = serial.Serial(DEVICE,BAUD,timeout=1)
if(ser.isOpen() == False):
ser.open()
A bit of a contrived example, but you get the idea. I know this question was asked a long time ago, but I had the same question today and felt anyone else finding this page would appreciate finding an answer.