Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Created April 27, 2011 00:33
Show Gist options
  • Save springmeyer/943488 to your computer and use it in GitHub Desktop.
Save springmeyer/943488 to your computer and use it in GitHub Desktop.
import sqlite3
db = '<db.sqlite>'
sql = 'select tile_data from tiles limit 1'
con = sqlite3.connect(db)
cur = con.cursor()
tiles = con.execute()
f = open('test.png','wb')
t = tiles.fetchone()
f.write(t[0])
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment