代码:
#!/usr/bin/python
#coding: utf-8
from brisa.core.reactors.qtreactor import QtReactor
reactor = QtReactor()
from brisa.core.network_listeners import UDPListeners
def forward_data(data, addr=""):
""" This is the data handler function, in this example it will simply
print the received data and the address from where it came
"""
print data, "from ", addr
server = UDPListener( "239.255.255.250",
port,
"interface",
data_callback = foward_data
)
""" Be sure to register the UDPListener’s stop function before using the
start method, or the program doesn’t end.
"""
server.start()
reactor.add_after_stop_func(server.stop)
reactor.main()
错误:
^{pr2}$在此之前,我已经安装了python brisa和qtrever。 http://brisa.garage.maemo.org/downloads.html
如何解决此导入错误?
目前没有回答
相关问题 更多 >
编程相关推荐