一、打开 IDLE


这样就可以把下面的代码复制进去了。
注意:python是对空格敏感的,如果空格数目不对会报错,一般我们使用Tab键输入空格。
注意下面这段代码:
import itchatmp
itchatmp.update_config(itchatmp.WechatConfig(
token='xxxxxxxxxx',
appId = 'xxxxxxxxxx',
appSecret = 'xxxxxxxxxx'))
@itchatmp.msg_register(itchatmp.content.TEXT)
def text_reply(msg):
return msg['content']
itchatmp.run()
作者:vansnowpea
链接:http://www.jianshu.com/p/6f386659f5aa
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
上处斜体部分修改为:return msg['Content']
二、单击file ,选择保存,我们新建一个script文件夹存代码
网友评论