Created
February 22, 2013 12:33
-
-
Save ameliaikeda/5013118 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with MySQLCursor() as cur: # MySQLCursor is an auth wrapper around MySQLdb.cursor | |
with open('all', 'r') as f: | |
for line in f: # this file is terrifyingly huge | |
if line.startswith "#" or not line: # comment, wordlist boundary | |
continue | |
cur.execute("INSERT IGNORE INTO wordlist (word) VALUES (%s)", (line,)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment