Fix examples due to report change
This commit is contained in:
parent
72741ff812
commit
1ead3d9d6a
@ -1,4 +1,4 @@
|
||||
EXAMPLES = $(wildcard *.py)
|
||||
EXAMPLES = $(wildcard tcp*.py)
|
||||
LOGFILES = ${EXAMPLES:.py=.log}
|
||||
|
||||
.PHONY: all
|
||||
|
4
_examples_/config.py
Normal file
4
_examples_/config.py
Normal file
@ -0,0 +1,4 @@
|
||||
import logging
|
||||
|
||||
DEBUG = False
|
||||
LOG_LEVEL = logging.DEBUG
|
@ -1,16 +1,14 @@
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
|
||||
import report
|
||||
import sys # nopep8
|
||||
sys.path.append('../..') # nopep8
|
||||
import tcp_socket
|
||||
import time
|
||||
import report
|
||||
|
||||
|
||||
def mirror_callback(data):
|
||||
return data
|
||||
|
||||
|
||||
report.stdoutLoggingConfigure(log_name_lvl=[('root', 'DEBUG'), ])
|
||||
report.default_logging_config()
|
||||
c = tcp_socket.tcp_client_stp('127.0.0.1', 17017)
|
||||
c.send(b'abc')
|
||||
print('The Client received: %s' % repr(c.receive()))
|
||||
|
@ -1,15 +1,15 @@
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
|
||||
import report
|
||||
import tcp_socket
|
||||
import sys # nopep8
|
||||
sys.path.append('../..') # nopep8
|
||||
import time
|
||||
import tcp_socket
|
||||
import report
|
||||
|
||||
|
||||
def mirror_callback(tcp):
|
||||
tcp.send(tcp.receive())
|
||||
|
||||
|
||||
report.stdoutLoggingConfigure(log_name_lvl=[('root', 'DEBUG'), ])
|
||||
logger = report.default_logging_config()
|
||||
s = tcp_socket.tcp_server_stp('127.0.0.1', 17017)
|
||||
s.register_callback(mirror_callback)
|
||||
|
||||
|
@ -1,16 +1,14 @@
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
|
||||
import report
|
||||
import sys # nopep8
|
||||
sys.path.append('../..') # nopep8
|
||||
import tcp_socket
|
||||
import time
|
||||
import report
|
||||
|
||||
|
||||
def mirror_callback(data):
|
||||
return data
|
||||
|
||||
|
||||
report.stdoutLoggingConfigure(log_name_lvl=[('root', 'DEBUG'), ])
|
||||
report.default_logging_config()
|
||||
c = tcp_socket.tcp_client('127.0.0.1', 17000)
|
||||
c.send(b'abc')
|
||||
print('The Client received: %s' % repr(c.receive()))
|
||||
|
@ -1,15 +1,15 @@
|
||||
import sys
|
||||
sys.path.append('../..')
|
||||
|
||||
import report
|
||||
import tcp_socket
|
||||
import sys # nopep8
|
||||
sys.path.append('../..') # nopep8
|
||||
import time
|
||||
import tcp_socket
|
||||
import report
|
||||
|
||||
|
||||
def mirror_callback(tcp):
|
||||
tcp.send(tcp.receive())
|
||||
|
||||
|
||||
report.stdoutLoggingConfigure(log_name_lvl=[('root', 'DEBUG'), ])
|
||||
report.default_logging_config()
|
||||
s = tcp_socket.tcp_server('127.0.0.1', 17000)
|
||||
s.register_callback(mirror_callback)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user