#!/usr/bin/env python3 """ Module Docstring """ # -*- coding: utf-8 -*- # import pypng import pyqrcode __author__ = "Gregory Matyola" __version__ = "0.1.0" __license__ = "No License" def main(): """ Main entry point of the app """ Wifi_Name = 'Fnord' Wifi_Protocol = 'WPA/WPA2' Wifi_Password = 'FooBarBaz' QRCode = pyqrcode.create(F'WIFI:S:{Wifi_Name};T:{Wifi_Protocol};P:{Wifi_Password};;') QRCode.svg('QRCode.svg', scale=8) QRCode.eps('QRCode.eps', scale=2) print(QRCode.terminal(quiet_zone=1)) # The pyqrcode module, while easy to use, is powerful. # You can set every property of the QR code. If you install the optional pypng module, # you can render the code as a PNG image. Below is a more complex example: ##### # big_code = pyqrcode.create('0987654321', error='L', version=27, mode='binary') # big_code.png('code.png', scale=6, module_color=[0, 0, 0, 128], background=[0xff, 0xff, 0xcc]) # big_code.show() # print("hello world") if __name__ == "__main__": """ This is executed when run from the command line """ main()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question