MCPcopy Index your code
hub / github.com/liuwons/wxBot / gen_qr_code

Method gen_qr_code

wxbot.py:579–592  ·  view source on GitHub ↗
(self, qr_file_path)

Source from the content-addressed store, hash-verified

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)

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected