MRAB wrote:
John Nagle wrote:
[snip]
So the correct combination, 5 bits with 1.5 stop bits, isn't supported in
Python. 1 stop bit will not physically work on Baudot teletypes; the
main camshaft doesn't come around fast enough. (Yes, there's an actual
mechanical reason for 1.5 stop bits.) Requesting 2 stop bits at the
Python level gets a reject at the Win32 level. (Not sure why Win32
doesn't allow that; extra stop bits just add delay, but don't hurt
anything. But it's not supported.)
I patched PySerial to support "STOPBITS_ONE5", for 1.5 stop bits,
and the big Teletype Model 15 is now banging out text from Python.
I actually put in "45.45" as the baud rate; it gets rounded down
to 45 for Windows, which works. That won't work on Linux, though;
there's a canned list of speeds for POSIX serial ports. (It's the
same list PDP-11 serial ports had in the 1970s, plus some later
extensions at the high end.)
1.5 or 2 stop bits is acceptable for the old heavy iron, but 1.5
is preferred, because there's less vibration and wear. With 2 stop bits,
the Teletype Model 15 clutch drops out on every character and the drive
train momentarily comes to a halt. With 1.5, everything rotates steadily.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list