Skip to content

Instantly share code, notes, and snippets.

@sinewalker
Last active February 7, 2017 12:46
Show Gist options
  • Select an option

  • Save sinewalker/cff4478ec6f8c34c8b8ed169f762e2be to your computer and use it in GitHub Desktop.

Select an option

Save sinewalker/cff4478ec6f8c34c8b8ed169f762e2be to your computer and use it in GitHub Desktop.
make a QR code from any text (requires qrcode: pip install qrcode pillow)
#!/usr/bin/env python
# usage: echo "My QR Text"|makeQR.py > myqr.png
# see http://alecthegeek.github.io/2013/04/28/creating-qr-codes-on-python.html
import sys
import qrcode
qrcode.make("".join(sys.stdin.readlines())).save("/dev/stdout","png")
@sinewalker
Copy link
Author

aborts with a write permission error for /dev/stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment