Merge pull request #109 from flyingtime/master

修复windows上出现的错误以及乱码问题
This commit is contained in:
Urinx
2016-10-23 21:58:00 +08:00
committed by GitHub
+9 -5
View File
@@ -958,8 +958,12 @@ class WebWeixin(object):
print '[*] 自动回复模式 ... 关闭' print '[*] 自动回复模式 ... 关闭'
logging.debug('[*] 自动回复模式 ... 关闭') logging.debug('[*] 自动回复模式 ... 关闭')
listenProcess = multiprocessing.Process(target=self.listenMsgMode) if sys.platform.startswith('win'):
listenProcess.start() import thread
thread.start_new_thread(self.listenMsgMode())
else:
listenProcess = multiprocessing.Process(target=self.listenMsgMode)
listenProcess.start()
while True: while True:
text = raw_input('') text = raw_input('')
@@ -1147,10 +1151,10 @@ if sys.stdout.encoding == 'cp936':
if __name__ == '__main__': if __name__ == '__main__':
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
import coloredlogs if not sys.platform.startswith('win'):
coloredlogs.install(level='DEBUG') import coloredlogs
coloredlogs.install(level='DEBUG')
webwx = WebWeixin() webwx = WebWeixin()
webwx.start() webwx.start()