> On Jan 11, 2018, at 11:36 AM, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote: > > On Thu, 11 Jan 2018 15:12:33 +0000, "Schoeni, Yann" > <yann.scho...@moutier.ch> declaimed the following: > >> I've a web application which needs to send data to a serial port. The >> webserver uses ajax to send data to a python script. >> >> The Python script uses the serial module to open, send data, and close the >> serial port. >> >> Is there a way to keep the serial port open ? >> >> Because for now, I open/close it between each transaction and I need to be >> 100% sure the data package will be send .. which is not the case with my >> actual python script.
I'd add one observation: while you can be reasonably sure that data is sent if you ask the serial port to send it, that does NOT mean it will be received. I suspect what is actually needed is a guarantee that the data is received. A serial port does not offer that guarantee. If the hardware is clean, it only offers a high probability. If you want guarantees, you need a data checking and acknowledgement protocol, like DDCMP or TCP or DECnet. paul _______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32