Closed vicliu6 closed 7 years ago
把函数放到main里面就可以运行 但是要怎样可以放到外面呢? 不好意思,谢谢
from wxpy import *
def print_others(msg):
print(msg) return msg.text
if name == "main" :
bot = Bot() bot.register( print_others ) embed( shell= 'ipython' )
自问自答一下,这样就行了
bot = Bot()
@bot.register() def print_others(msg):
embed( shell= 'ipython' )
把函数放到main里面就可以运行 但是要怎样可以放到外面呢? 不好意思,谢谢
from wxpy import *
def print_others(msg):
if name == "main" :