Skip to content

Instantly share code, notes, and snippets.

@aniversarioperu
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniversarioperu/2c4f4e6c783a9c34e1e0 to your computer and use it in GitHub Desktop.
Save aniversarioperu/2c4f4e6c783a9c34e1e0 to your computer and use it in GitHub Desktop.
import sys
import dataset
filename = sys.argv[1].strip()
db = dataset.connect('mysql://user:password@localhost/ashley')
table = db['aminno_member_email']
with open(filename, 'r') as handle:
for line in handle:
line = line.strip()
res = table.find_one(email=line)
if res:
print(res, res['pnum'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment