2015-04-13 20:58:32 +00:00
|
|
|
#!/usr/bin/env python3
|
2015-03-09 17:32:24 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
import os, sqlite3, sys
|
|
|
|
|
|
|
|
try:
|
|
|
|
file = sys.argv[1]
|
|
|
|
except IndexError:
|
|
|
|
file = "Database.db"
|
|
|
|
|
|
|
|
if os.path.isfile(file):
|
|
|
|
os.remove(file)
|
|
|
|
|
|
|
|
conn = sqlite3.connect(file)
|
|
|
|
curs = conn.cursor()
|
|
|
|
|
|
|
|
curs.execute("CREATE TABLE tweets(tweet_id numeric, timestamp text, text text);")
|
|
|
|
|
|
|
|
conn.commit()
|
|
|
|
conn.close()
|