diff options
author | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2009-07-23 14:02:41 +0000 |
---|---|---|
committer | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2009-07-23 14:02:41 +0000 |
commit | 7aaead37bbfb200f4b09e78ebb27bf81d6824e3b (patch) | |
tree | 909269541b8eda3e20623192ef6fe9a350f3777a /pyserial/serial/serialposix.py | |
parent | 6291bc28476a84337d36acda42c735f7c6c66908 (diff) | |
download | pyserial-git-7aaead37bbfb200f4b09e78ebb27bf81d6824e3b.tar.gz |
remove print and replace with stdio writes
Diffstat (limited to 'pyserial/serial/serialposix.py')
-rw-r--r-- | pyserial/serial/serialposix.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pyserial/serial/serialposix.py b/pyserial/serial/serialposix.py index 71b73b5..c12a27b 100644 --- a/pyserial/serial/serialposix.py +++ b/pyserial/serial/serialposix.py @@ -69,7 +69,8 @@ elif plat[:3] == 'aix': # AIX else: #platform detection has failed... - print """don't know how to number ttys on this system. + sys.stderr.write("""\ +don't know how to number ttys on this system. ! Use an explicit path (eg /dev/ttyS1) or send this information to ! the author of this module: @@ -81,7 +82,7 @@ also add the device name of the serial port and where the counting starts for the first serial port. e.g. 'first serial port: /dev/ttyS0' and with a bit luck you can get this module running... -""" % (sys.platform, os.name, VERSION) +""" % (sys.platform, os.name, VERSION)) # no exception, just continue with a brave attempt to build a device name # even if the device name is not correct for the platform it has chances # to work using a string with the real device name as port parameter. @@ -496,7 +497,7 @@ if __name__ == '__main__': s.flushInput() s.flushOutput() s.write('hello') - print repr(s.read(5)) - print s.inWaiting() + sys.stdio.write('%r\n' % s.read(5)) + sys.stdio.write('%s\n' % s.inWaiting()) del s |