Created
March 29, 2011 23:10
-
-
Save bgw/893542 to your computer and use it in GitHub Desktop.
Updates a botguy-ng experimental database file from the old shove-based format to the new sqlite3-based format
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
# Python 2 or 3 | |
# Updates a botguy-ng experimental database file from the old shove-based format | |
# to the new sqlite3-based format | |
from bot import database | |
import pickle | |
p = pickle.load(open("botguy_info.db/userdef")) | |
db_manager = database.Database("botguy_info_converted.db") | |
db = db_manager.register_plugin("userdef", "shelf") | |
for i in p: | |
db[i] = p[i] | |
db_manager.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment