12 lines
298 B
Python
12 lines
298 B
Python
import sys
|
|
import os
|
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
|
|
from database import TradeDB
|
|
|
|
db = TradeDB()
|
|
try:
|
|
tables = [r["Tables_in_" + db.config["database"]] for r in db.conn.execute("SHOW TABLES").fetchall()]
|
|
print("Tables:", tables)
|
|
finally:
|
|
db.close()
|