Changeset 146


Ignore:
Timestamp:
Jul 14, 2010, 10:37:14 PM (14 years ago)
Author:
Rick van der Zwet
Message:

stderr to the right place

File:
1 edited

Legend:

Unmodified
Added
Removed
  • misc/serial-sniffer.py

    r145 r146  
    1111import signal
    1212import os
     13import sys
    1314
    1415# Stolen from http://snippets.dzone.com/posts/show/7682
     
    5556            break
    5657      else:
    57          print "# send_buffer filled %s" % str_to_hex(send_buffer)
     58         sys.stderr.write("# send_buffer filled %s" % str_to_hex(send_buffer))
    5859 
    5960      if recv_buffer == "":
     
    6566            break
    6667      else:
    67          print "# recv_buffer filled %s" % str_to_hex(recv_buffer)
     68         sys.stderr.write("# recv_buffer filled %s" % str_to_hex(recv_buffer))
    6869 
    6970    # Try to fetch comment if we have any
     
    9091  try:
    9192    main()
    92   except:
     93  except KeyboardInterrupt:
    9394    pass
    9495  os.system('stty echo')
Note: See TracChangeset for help on using the changeset viewer.