Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias TryExcept body Import alias handlers ExceptHandler type NameLoad body ClassDef bases body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore Num Assign TupleStore NameStore NameStore NameStore TupleLoad Num Num Num decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str Str Str body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad TryExcept body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpBitOr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str AugAssignAdd AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareLt Call NameLoad AttributeLoad NameLoad attr Num body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Call NameLoad Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num If NameLoad body If CompareIsNot AttributeLoad NameLoad attr NameLoad body If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd AttributeStore NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num If NameLoad body If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd AttributeStore NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad keyword Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryFinally body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad finalbody Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Import alias Import alias Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Num keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Num keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Call NameLoad AttributeLoad NameLoad attr BinOpSub Call NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list Assign AttributeStore NameLoad attr AttributeStore NameLoad attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr Str attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num If CompareIs AttributeLoad NameLoad attr NameLoad body Import alias Expr Call AttributeLoad NameLoad attr Str ClassDef bases body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body AugAssignAdd AttributeStore NameLoad attr NameLoad If CompareIn Str AttributeLoad NameLoad attr body Assign TupleStore NameStore AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list Assign AttributeStore NameLoad attr AttributeStore NameLoad attr Call NameLoad Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Delete SubscriptDel NameLoad Index AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list Assign NameStore NameLoad Assign NameStore Num While NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad Num Assign NameStore ListComp NameLoad comprehension TupleStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr For NameStore Call AttributeLoad Call NameLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index NameLoad Expr Call NameLoad SubscriptLoad NameLoad Index NameLoad For NameStore Call NameLoad Call AttributeLoad Call NameLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr While CompareIn NameLoad NameLoad body AugAssignAdd NameStore Num Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Assign NameStore Dict Assign NameStore Dict Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num For NameStore NameLoad body Expr Call SubscriptLoad NameLoad Index NameLoad For NameStore NameLoad body Expr Call SubscriptLoad NameLoad Index NameLoad For NameStore NameLoad body Expr Call SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str ExceptHandler type NameLoad body Raise ExceptHandler body Expr Call AttributeLoad NameLoad attr
N/A N/A Multi-port serial<->TCP/IP forwarder.
- RFC 2217
- check existence of serial port periodically
- start/stop forwarders
- each forwarder creates a server socket and opens the serial port
- serial ports are opened only once. network connect/disconnect
  does not influence serial port
- only one client per connection
 N/A os N/A select N/A socket N/A sys N/A time N/A traceback N/A serial N/A serial.rfc2217 N/A serial.tools.list_ports N/A dbus N/A N/A N/A avahi N/A N/A N/A ImportError N/A avahi N/A N/A N/A DBUS_NAME org.freedesktop.Avahi N/A DBUS_PATH_SERVER / N/A DBUS_INTERFACE_SERVER org.freedesktop.Avahi.Server N/A DBUS_INTERFACE_ENTRY_GROUP N/A DBUS_NAME .EntryGroup N/A IF_UNSPEC -1 N/A N/A PROTO_UNSPEC PROTO_INET PROTO_INET6 N/A -1 0 1 N/A ZeroconfService N/A N/A N/A     A simple class to publish a network service with zeroconf using avahi.
     __init__ N/A N/A self name port stype domain host text N/A _http._tcp N/A N/A N/A self name name N/A N/A self stype stype N/A N/A self domain domain N/A N/A self host host N/A N/A self port port N/A N/A self text text N/A N/A self group None N/A publish N/A N/A self N/A N/A N/A bus N/A N/A dbus SystemBus N/A server N/A N/A dbus Interface N/A N/A bus get_object N/A avahi DBUS_NAME N/A avahi DBUS_PATH_SERVER N/A avahi DBUS_INTERFACE_SERVER N/A g N/A N/A dbus Interface N/A N/A bus get_object N/A avahi DBUS_NAME N/A N/A server EntryGroupNew N/A avahi DBUS_INTERFACE_ENTRY_GROUP N/A N/A N/A g AddService N/A avahi IF_UNSPEC N/A avahi PROTO_UNSPEC N/A N/A dbus UInt32 0 N/A self name N/A self stype N/A self domain N/A self host N/A N/A dbus UInt16 N/A self port N/A self text N/A N/A N/A g Commit N/A N/A self group g N/A unpublish N/A N/A self N/A N/A N/A N/A N/A self group None N/A N/A N/A N/A N/A self group Reset N/A N/A self group None N/A __str__ N/A N/A self N/A N/A N/A N/A %r @ %s:%s (%s) N/A N/A self name N/A self host N/A self port N/A self stype N/A N/A Forwarder N/A ZeroconfService N/A N/A     Single port serial<->TCP/IP forarder that depends on an external select
    loop.
    - Buffers for serial -> network and network -> serial
    - RFC 2217 state
    - Zeroconf publish/unpublish on open/close.
     __init__ N/A N/A self device name network_port on_close log N/A None None N/A N/A N/A N/A ZeroconfService __init__ self name network_port stype _serial_port._tcp N/A N/A self alive False N/A N/A self network_port network_port N/A N/A self on_close on_close N/A N/A self log log N/A N/A self device device N/A N/A self serial N/A N/A serial Serial N/A N/A N/A self serial port device N/A N/A N/A self serial baudrate 115200 N/A N/A N/A self serial timeout 0 N/A N/A self socket None N/A N/A self server_socket None N/A N/A self rfc2217 None N/A __del__ N/A N/A self N/A N/A N/A N/A N/A N/A self alive N/A N/A N/A N/A self close N/A N/A N/A N/A N/A open N/A N/A self N/A N/A N/A open serial port, start network server and publish service N/A N/A self buffer_net2ser N/A bytearray N/A N/A self buffer_ser2net N/A bytearray N/A N/A N/A N/A N/A self serial rts False N/A N/A N/A N/A self serial open N/A N/A N/A Exception N/A msg N/A N/A N/A N/A self handle_serial_error msg N/A N/A self serial_settings_backup N/A N/A N/A self serial get_settings N/A N/A self server_socket N/A N/A socket socket N/A socket AF_INET N/A socket SOCK_STREAM N/A N/A N/A N/A self server_socket setsockopt N/A socket SOL_SOCKET N/A socket SO_REUSEADDR N/A N/A N/A N/A self server_socket getsockopt N/A socket SOL_SOCKET N/A socket SO_REUSEADDR 1 N/A N/A N/A N/A self server_socket setblocking 0 N/A N/A N/A N/A N/A N/A self server_socket bind N/A N/A self network_port N/A N/A N/A N/A self server_socket listen 1 N/A N/A N/A N/A socket error N/A msg N/A N/A N/A N/A self handle_server_error N/A N/A N/A self log None N/A N/A N/A N/A N/A self log info N/A %s: Waiting for connection on %s... N/A N/A self device N/A self network_port N/A N/A N/A self publish N/A N/A self alive True N/A close N/A N/A self N/A N/A N/A Close all resources and unpublish service N/A N/A N/A self log None N/A N/A N/A N/A N/A self log info N/A %s: closing... N/A N/A self device N/A N/A self alive False N/A N/A N/A self unpublish N/A N/A self server_socket N/A N/A N/A N/A N/A self server_socket close N/A N/A self socket N/A N/A N/A N/A self handle_disconnect N/A N/A N/A N/A self serial close N/A N/A N/A self on_close None N/A N/A callback N/A self on_close N/A N/A self on_close None N/A N/A callback self N/A write N/A N/A self data N/A N/A N/A the write method is used by serial.rfc2217.PortManager. it has to
        write to the network. N/A N/A self buffer_ser2net data N/A update_select_maps N/A N/A self read_map write_map error_map N/A N/A N/A Update dictionaries for select call. insert fd->callback mapping N/A N/A self alive N/A N/A N/A read_map N/A N/A self serial N/A self handle_serial_read N/A N/A error_map N/A N/A self serial N/A self handle_serial_error N/A N/A self buffer_net2ser N/A N/A N/A write_map N/A N/A self serial N/A self handle_serial_write N/A N/A N/A self socket None N/A N/A N/A N/A len N/A self buffer_net2ser 2048 N/A N/A N/A read_map N/A N/A self socket N/A self handle_socket_read N/A N/A self buffer_ser2net N/A N/A N/A write_map N/A N/A self socket N/A self handle_socket_write N/A N/A error_map N/A N/A self socket N/A self handle_socket_error N/A N/A N/A self buffer_ser2net N/A bytearray N/A N/A read_map N/A N/A self server_socket N/A self handle_connect N/A N/A error_map N/A N/A self server_socket N/A self handle_server_error N/A handle_serial_read N/A N/A self N/A N/A N/A Reading from serial port N/A N/A N/A data N/A N/A os read N/A N/A N/A self serial fileno 1024 N/A data N/A N/A N/A N/A self socket None N/A N/A N/A self rfc2217 N/A N/A data N/A N/A serial to_bytes N/A N/A N/A self rfc2217 escape data N/A N/A self buffer_ser2net data N/A N/A N/A N/A self handle_serial_error N/A N/A N/A Exception N/A msg N/A N/A N/A N/A self handle_serial_error msg N/A handle_serial_write N/A N/A self N/A N/A N/A Writing to serial port N/A N/A N/A n N/A N/A os write N/A N/A N/A self serial fileno N/A bytes N/A self buffer_net2ser N/A N/A self buffer_net2ser N/A N/A self buffer_net2ser N/A n N/A N/A N/A Exception N/A msg N/A N/A N/A N/A self handle_serial_error msg N/A handle_serial_error N/A N/A self error N/A None N/A N/A Serial port error N/A N/A N/A self close N/A handle_socket_read N/A N/A self N/A N/A N/A Read from socket N/A N/A N/A data N/A N/A N/A self socket recv 1024 N/A data N/A N/A N/A self rfc2217 N/A N/A data N/A N/A serial to_bytes N/A N/A N/A self rfc2217 filter data N/A N/A self buffer_net2ser data N/A N/A N/A N/A self handle_disconnect N/A N/A N/A N/A socket error N/A N/A N/A N/A self handle_socket_error N/A handle_socket_write N/A N/A self N/A N/A N/A Write to socket N/A N/A N/A count N/A N/A N/A self socket send N/A bytes N/A self buffer_ser2net N/A N/A self buffer_ser2net N/A N/A self buffer_ser2net N/A count N/A N/A N/A N/A socket error N/A N/A N/A N/A self handle_socket_error N/A handle_socket_error N/A N/A self N/A N/A N/A Socket connection fails N/A N/A N/A self handle_disconnect N/A handle_connect N/A N/A self N/A N/A N/A Server socket gets a connection N/A N/A connection addr N/A N/A N/A self server_socket accept N/A N/A N/A self socket None N/A N/A N/A self socket connection N/A N/A N/A N/A self socket setsockopt N/A socket SOL_SOCKET N/A socket SO_KEEPALIVE 1 N/A N/A N/A N/A self socket setsockopt N/A socket IPPROTO_TCP N/A socket TCP_KEEPIDLE 1 N/A N/A N/A N/A self socket setsockopt N/A socket IPPROTO_TCP N/A socket TCP_KEEPINTVL 1 N/A N/A N/A N/A self socket setsockopt N/A socket IPPROTO_TCP N/A socket TCP_KEEPCNT 3 N/A N/A N/A N/A self socket setblocking 0 N/A N/A N/A N/A self socket setsockopt N/A socket IPPROTO_TCP N/A socket TCP_NODELAY 1 N/A N/A N/A self log None N/A N/A N/A N/A N/A self log warning N/A %s: Connected by %s:%s N/A N/A self device N/A addr N/A 0 N/A addr N/A 1 N/A N/A N/A self serial rts True N/A N/A N/A self serial dtr True N/A N/A N/A self log None N/A N/A N/A self rfc2217 N/A N/A N/A serial rfc2217 PortManager N/A self serial self logger N/A N/A log getChild N/A self device N/A N/A N/A self rfc2217 N/A N/A N/A serial rfc2217 PortManager N/A self serial self N/A N/A N/A N/A connection close N/A N/A N/A self log None N/A N/A N/A N/A N/A self log warning N/A %s: Rejecting connect from %s:%s N/A N/A self device N/A addr N/A 0 N/A addr N/A 1 N/A handle_server_error N/A N/A self N/A N/A N/A Socket server fails N/A N/A N/A self close N/A handle_disconnect N/A N/A self N/A N/A N/A Socket gets disconnected N/A N/A N/A N/A N/A self serial rts False N/A N/A N/A self serial dtr False N/A N/A N/A N/A N/A self serial apply_settings N/A self serial_settings_backup N/A N/A self rfc2217 None N/A N/A self buffer_ser2net N/A bytearray N/A N/A N/A self socket None N/A N/A N/A N/A N/A self socket close N/A N/A self socket None N/A N/A N/A self log None N/A N/A N/A N/A N/A self log warning N/A %s: Disconnected N/A self device N/A N/A test N/A N/A N/A N/A N/A service N/A ZeroconfService name TestService port 3000 N/A N/A N/A service publish N/A N/A input Press the ENTER key to unpublish the service  N/A N/A N/A service unpublish N/A N/A N/A __name__ __main__ N/A N/A logging N/A argparse N/A VERBOSTIY N/A N/A logging ERROR N/A logging WARNING N/A logging INFO N/A logging DEBUG N/A parser N/A N/A argparse ArgumentParser usage %(prog)s [options]

Announce the existence of devices using zeroconf and provide
a TCP/IP <-> serial port gateway (implements RFC 2217).

If running as daemon, write to syslog. Otherwise write to stdout.
 epilog NOTE: no security measures are implemented. Anyone can remotely connect
to this service over the network.

Only one connection at once, per port, is supported. When the connection is
terminated, it waits for the next connect.
 N/A group N/A N/A parser add_argument_group serial port settings N/A N/A N/A group add_argument --ports-regex help specify a regex to search against the serial devices and their descriptions (default: %(default)s) default /dev/ttyUSB[0-9]+ metavar REGEX N/A group N/A N/A parser add_argument_group network settings N/A N/A N/A group add_argument --tcp-port dest base_port help specify lowest TCP port number (default: %(default)s) default 7000 type int metavar PORT N/A group N/A N/A parser add_argument_group daemon N/A N/A N/A group add_argument -d --daemon dest daemonize action store_true help start as daemon default False N/A N/A N/A group add_argument --pidfile help specify a name for the PID file default None metavar FILE N/A group N/A N/A parser add_argument_group diagnostics N/A N/A N/A group add_argument -o --logfile help write messages file instead of stdout default None metavar FILE N/A N/A N/A group add_argument -q --quiet dest verbosity action store_const const 0 help suppress most diagnostic messages default 1 N/A N/A N/A group add_argument -v --verbose dest verbosity action count help increase diagnostic messages N/A args N/A N/A parser parse_args N/A N/A N/A logging basicConfig level N/A VERBOSTIY N/A N/A min N/A args verbosity N/A N/A len VERBOSTIY 1 N/A log N/A N/A logging getLogger port_publisher N/A N/A N/A args logfile None N/A WriteFlushed N/A N/A __init__ N/A N/A self fileobj N/A N/A N/A N/A self fileobj fileobj N/A write N/A N/A self s N/A N/A N/A N/A N/A N/A self fileobj write s N/A N/A N/A N/A self fileobj flush N/A close N/A N/A self N/A N/A N/A N/A N/A N/A self fileobj close N/A N/A N/A N/A sys stdout N/A sys stderr N/A WriteFlushed N/A open N/A args logfile a N/A N/A args daemonize N/A N/A N/A N/A pid N/A N/A os fork N/A N/A pid 0 N/A N/A N/A N/A sys exit 0 N/A N/A N/A OSError N/A e N/A N/A N/A N/A log critical N/A fork #1 failed: %d (%s)
 N/A N/A e errno N/A e strerror N/A N/A N/A sys exit 1 N/A N/A N/A os chdir / N/A N/A N/A os setsid N/A N/A N/A os umask 0 N/A N/A N/A pid N/A N/A os fork N/A N/A pid 0 N/A N/A N/A N/A args pidfile None N/A N/A N/A N/A N/A open N/A args pidfile w write N/A %d pid N/A N/A N/A sys exit 0 N/A N/A N/A OSError N/A e N/A N/A N/A N/A log critical N/A fork #2 failed: %d (%s)
 N/A N/A e errno N/A e strerror N/A N/A N/A sys exit 1 N/A N/A N/A args logfile None N/A N/A syslog N/A N/A N/A syslog openlog serial port publisher WriteToSysLog N/A N/A __init__ N/A N/A self N/A N/A N/A N/A self buffer N/A write N/A N/A self s N/A N/A N/A N/A self buffer s N/A N/A N/A self buffer N/A N/A N/A output N/A self buffer N/A N/A N/A self buffer split 1 N/A N/A N/A syslog syslog output N/A flush N/A N/A self N/A N/A N/A N/A N/A syslog syslog N/A self buffer N/A N/A self buffer N/A close N/A N/A self N/A N/A N/A N/A N/A self flush N/A N/A N/A N/A sys stdout N/A sys stderr N/A WriteToSysLog N/A published N/A N/A hostname N/A N/A socket gethostname unpublish N/A N/A forwarder N/A N/A N/A when forwarders die, we need to unregister them N/A N/A N/A N/A published N/A N/A forwarder device N/A N/A N/A KeyError N/A N/A N/A N/A N/A N/A log info N/A unpublish: %s forwarder N/A N/A alive True N/A next_check 0 N/A alive N/A N/A N/A N/A now N/A N/A time time N/A N/A now next_check N/A N/A next_check N/A now 5 N/A connected N/A d N/A N/A d p i N/A N/A N/A N/A serial tools list_ports grep N/A args ports_regex N/A device N/A N/A N/A set published difference connected N/A N/A N/A N/A log info N/A unpublish: %s N/A published N/A device N/A N/A unpublish N/A published N/A device N/A device N/A sorted N/A N/A N/A set connected difference published N/A N/A port N/A args base_port N/A ports_in_use N/A N/A f network_port N/A f N/A N/A published values N/A N/A port ports_in_use N/A N/A port 1 N/A N/A published N/A device N/A Forwarder device N/A %s on %s N/A device hostname port on_close unpublish log log N/A N/A N/A log warning N/A publish: %s N/A published N/A device N/A N/A N/A N/A published N/A device open N/A read_map N/A N/A write_map N/A N/A error_map N/A N/A publisher N/A N/A published values N/A N/A N/A N/A publisher update_select_maps read_map write_map error_map N/A N/A readers writers errors N/A N/A select select N/A N/A read_map keys N/A N/A write_map keys N/A N/A error_map keys 5 N/A reader readers N/A N/A N/A N/A read_map N/A reader N/A writer writers N/A N/A N/A N/A write_map N/A writer N/A error errors N/A N/A N/A N/A error_map N/A error N/A N/A N/A KeyboardInterrupt N/A N/A alive False N/A N/A N/A N/A sys stdout write N/A N/A SystemExit N/A N/A N/A N/A N/A N/A N/A traceback print_exc