Mercurial > hg > Feedworm
diff feedworm-gui.py @ 119:04a730f9d07d backend
move all sqlalchemy related classes to the respective sub-package. use a backend to abstract from access to the data
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sun, 21 Aug 2011 03:55:16 +0200 |
parents | b8bfd1bd6c55 |
children | 9e1e6b96d8b0 |
line wrap: on
line diff
--- a/feedworm-gui.py Sun Aug 21 02:47:25 2011 +0200 +++ b/feedworm-gui.py Sun Aug 21 03:55:16 2011 +0200 @@ -1,11 +1,10 @@ -import Database from MainWindow import MainWindow -from Preferences import Preferences from PyQt4 import QtGui from PyQt4.QtNetwork import QNetworkProxy +from backend.sqlalchemy.SqlAlchemyBackend import SqlAlchemyBackend +import logging import sys -import util def setupProxy(preferences): if preferences.isProxyConfigured(): @@ -15,14 +14,14 @@ QNetworkProxy.setApplicationProxy(proxy) if __name__ == '__main__': - util.configureLogging() - session = Database.createSession() - preferences = Preferences(session) + logging.basicConfig(level=logging.DEBUG) + backend = SqlAlchemyBackend() + preferences = backend.preferences() setupProxy(preferences) app = QtGui.QApplication(sys.argv) - mainWindow = MainWindow(session) + mainWindow = MainWindow(backend) maximized = preferences.startMaximized() if maximized: