Commits

Joel Mohler  committed 4307b57

ipython local kernel widget removal

  • Participants
  • Parent commits 4343eec

Comments (0)

Files changed (1)

File pyhacc/PyHaccMainWindow.py

 import reports
 import datetime
 import qtviews
-
-try:
-    import qtviews.console as console
-    IPythonLocalKernelWidget = console.IPythonLocalKernelWidget
-except Exception:
-    IPythonLocalKernelWidget = None
-
-
 from sqlalchemy import MetaData, ForeignKey, create_engine, select, join
 
 from PyHaccSchema import *
     Session.balance_refresh = w.refresh
     return w
 
-def IPythonConsole(Session):
-    w = IPythonLocalKernelWidget(colors='lightbg')
-    w.title = 'Console'
-    w.appType = 'IPythonConsole'
-    w.user_ns['Session'] = Session
-    w.user_ns['Accounts'] = Accounts
-    w.user_ns['Journals'] = Journals
-    w.user_ns['AccountTypes'] = AccountTypes
-    w.user_ns['Transactions'] = Transactions
-    w.user_ns['Splits'] = Splits
-    w.user_ns['sql_and'] = expr.and_
-    w.user_ns['sql_or'] = expr.or_
-    w.user_ns['sql_sum'] = func.sum
-    return w
-
 class MainWindow(QtGui.QMainWindow, qtviews.TabbedWorkspaceMixin):
     WindowName = 'PyHaccMainWindow'
 
             'Date': lambda: DateWidget(None, Session)
             })
 
-        if IPythonLocalKernelWidget is not None:
-            self.updateViewFactory({'IPythonConsole': lambda: IPythonConsole(Session)})
-
         self.createMenus()
         self.Session = Session
 
     def tagList(self):
         self.addWorkspaceWindowOrSelect('TagList')
 
-    if IPythonLocalKernelWidget is not None:
-        @fileCommands.command("View &Console", statusTip="View IPython Console", key="F4")
-        def viewConsole(self):
-            self.addWorkspaceWindowOrSelect('IPythonConsole')
-
     fileCommands.command("E&xit", key="Ctrl+Q", statusTip="Exit the application")(QtGui.QMainWindow.close)
 
     @accountsCommands.command("View &Journals", statusTip="View Journal List", key="Ctrl+J")