| 577 | return False |
| 578 | |
| 579 | def gen_qr_code(self, qr_file_path): |
| 580 | string = 'https://login.weixin.qq.com/l/' + self.uuid |
| 581 | qr = pyqrcode.create(string) |
| 582 | if self.conf['qr'] == 'png': |
| 583 | qr.png(qr_file_path, scale=8) |
| 584 | if sys.platform.find('darwin') >= 0: |
| 585 | subprocess.call(['open', qr_file_path]) |
| 586 | elif sys.platform.find('linux') >= 0: |
| 587 | subprocess.call(['xdg-open', qr_file_path]) |
| 588 | else: |
| 589 | os.startfile(qr_file_path) |
| 590 | |
| 591 | elif self.conf['qr'] == 'tty': |
| 592 | print(qr.terminal(quiet_zone=1)) |
| 593 | |
| 594 | def wait4login(self, tip): |
| 595 | time.sleep(tip) |