请找管理员授权。/funnyscript/edit_node_item.php
#!/usr/bin/python # -*- coding: UTF-8 -*- #python3 版本!!! # pip3 install -U socketIO-client-nexus from socketIO_client_nexus import SocketIO, LoggingNamespace def on_bbb_response(*args): print('on_bbb_response', args) file=sys.argv[1] user=sys.argv[2] to=sys.argv[3] msg=sys.argv[4] event_type=sys.argv[5] stype=sys.argv[6] import configparser config = configparser.ConfigParser() config.read_file(open(file)) ip = config.get("main","socket.ip") port = config.get("main","socket.port") with SocketIO(ip, port, LoggingNamespace) as socketIO: socketIO.emit(event_type {'type':stype,'from':user,'to':to,'message':msg}, on_bbb_response) socketIO.wait_for_callbacks(seconds=1)
ID=5928 send_msg.py v2
保存
#!/usr/bin/python # -*- coding: UTF-8 -*- #python3 版本!!! # pip3 install -U socketIO-client-nexus from socketIO_client_nexus import SocketIO, LoggingNamespace def on_bbb_response(*args): print('on_bbb_response', args) file=sys.argv[1] user=sys.argv[2] to=sys.argv[3] msg=sys.argv[4] event_type=sys.argv[5] stype=sys.argv[6] import configparser config = configparser.ConfigParser() config.read_file(open(file)) ip = config.get("main","socket.ip") port = config.get("main","socket.port") with SocketIO(ip, port, LoggingNamespace) as socketIO: socketIO.emit(event_type {'type':stype,'from':user,'to':to,'message':msg}, on_bbb_response) socketIO.wait_for_callbacks(seconds=1)