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}
|
LOGFILES = ${EXAMPLES:.py=.log}
|
||||||
|
|
||||||
.PHONY: all
|
.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
|
import sys # nopep8
|
||||||
sys.path.append('../..')
|
sys.path.append('../..') # nopep8
|
||||||
|
|
||||||
import report
|
|
||||||
import tcp_socket
|
import tcp_socket
|
||||||
import time
|
import report
|
||||||
|
|
||||||
|
|
||||||
def mirror_callback(data):
|
def mirror_callback(data):
|
||||||
return 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 = tcp_socket.tcp_client_stp('127.0.0.1', 17017)
|
||||||
c.send(b'abc')
|
c.send(b'abc')
|
||||||
print('The Client received: %s' % repr(c.receive()))
|
print('The Client received: %s' % repr(c.receive()))
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import sys
|
import sys # nopep8
|
||||||
sys.path.append('../..')
|
sys.path.append('../..') # nopep8
|
||||||
|
|
||||||
import report
|
|
||||||
import tcp_socket
|
|
||||||
import time
|
import time
|
||||||
|
import tcp_socket
|
||||||
|
import report
|
||||||
|
|
||||||
|
|
||||||
def mirror_callback(tcp):
|
def mirror_callback(tcp):
|
||||||
tcp.send(tcp.receive())
|
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 = tcp_socket.tcp_server_stp('127.0.0.1', 17017)
|
||||||
s.register_callback(mirror_callback)
|
s.register_callback(mirror_callback)
|
||||||
|
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
import sys
|
import sys # nopep8
|
||||||
sys.path.append('../..')
|
sys.path.append('../..') # nopep8
|
||||||
|
|
||||||
import report
|
|
||||||
import tcp_socket
|
import tcp_socket
|
||||||
import time
|
import report
|
||||||
|
|
||||||
|
|
||||||
def mirror_callback(data):
|
def mirror_callback(data):
|
||||||
return 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 = tcp_socket.tcp_client('127.0.0.1', 17000)
|
||||||
c.send(b'abc')
|
c.send(b'abc')
|
||||||
print('The Client received: %s' % repr(c.receive()))
|
print('The Client received: %s' % repr(c.receive()))
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import sys
|
import sys # nopep8
|
||||||
sys.path.append('../..')
|
sys.path.append('../..') # nopep8
|
||||||
|
|
||||||
import report
|
|
||||||
import tcp_socket
|
|
||||||
import time
|
import time
|
||||||
|
import tcp_socket
|
||||||
|
import report
|
||||||
|
|
||||||
|
|
||||||
def mirror_callback(tcp):
|
def mirror_callback(tcp):
|
||||||
tcp.send(tcp.receive())
|
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 = tcp_socket.tcp_server('127.0.0.1', 17000)
|
||||||
s.register_callback(mirror_callback)
|
s.register_callback(mirror_callback)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user