Skip to content

Instantly share code, notes, and snippets.

@maxfell
Created May 27, 2013 07:02
Show Gist options
  • Select an option

  • Save maxfell/5655560 to your computer and use it in GitHub Desktop.

Select an option

Save maxfell/5655560 to your computer and use it in GitHub Desktop.
makeQR
import requests
import console
import Image
import StringIO
content = sys.argv[1]
console.clear()
print "Generating QR-Code for: " + content
console.show_activity()
r = requests.get("http://chart.apis.google.com/chart?chs=320x320&cht=qr&chl=" + content)
i = Image.open(StringIO.StringIO(r.content))
i.save("qr.png")
console.show_image("qr.png")
console.hide_activity()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment