ok, con(1) does more than just dial, read and write, it might also do rlogin...
does a C version of your script behave as expected? what about dd -bs 1 -if /dev/eai0 ? as for new lines there's also a "rU" mode... On Thu, Aug 26, 2010 at 9:18 PM, Michaelian Ennis <men...@corvus.net> wrote: > I've noticed some behaviors I can't explain with python and plan9. I > am using contrib/installed bichued/python. Trying to read from a > serial port I would suspect I would have to use f.read() if I want to > be able to catch a specific string where there is no newline. > > For instance: > When my firewall is finished booting it end with this output: > > Type help or '?' for a list of available commands. > firewall> > > "firewall>" being the command prompt. I would expect to see the same from: > > import sys > f = open("/dev/eia0","r") > while (True): > sys.stdout.write(f.read(1)) > > Yet this only yields: > Type help or '?' for a list of available commands. > > Which makes me think it is still looking for a newline. Cons exhibits > the expected behavior with the same appliance. That is the prompt is > included. > > ian > > -- Federico G. Benavento