Ignore:
Timestamp:
Sep 13, 2017 6:24:34 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
3c8242c
Parents:
9909967
Message:

Startup time improvements - hiding expensive imports and such

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Utilities/IPythonWidget.py

    r985ad94 rfef38e8  
     1from PyQt4 import QtCore, QtGui, QtSvg 
     2 
    13def new_load_qt(api_options): 
    2     from PyQt4 import QtCore, QtGui, QtSvg 
    34    return QtCore, QtGui, QtSvg, 'pyqt' 
    45 
    56def qtconsole_new_load_qt(api_options): 
    6     from PyQt4 import QtCore, QtGui, QtSvg 
    7  
    87    # Alias PyQt-specific functions for PySide compatibility. 
    98    QtCore.Signal = QtCore.pyqtSignal 
     
    1110    return QtCore, QtGui, QtSvg, 'pyqt' 
    1211 
     12from IPython.external import  qt_loaders 
     13from qtconsole import qt_loaders as qtconsole_qt_loaders 
    1314# Do some monkey patching to satisfy pyinstaller complaining 
    1415# about pyside/pyqt confusion 
    15 from IPython.external import  qt_loaders 
    1616qt_loaders.load_qt = new_load_qt 
    17  
    18 from qtconsole import qt_loaders as qtconsole_qt_loaders 
    1917qtconsole_qt_loaders.load_qt = qtconsole_new_load_qt 
    2018 
    21  
    2219from qtconsole.rich_jupyter_widget import RichJupyterWidget 
    23 from qtconsole.inprocess import QtInProcessKernelManager 
    24 from IPython.lib import guisupport 
    2520 
    2621MODULES_TO_IMPORT = [ 
     
    3227    def __init__(self, parent=None, **kwargs): 
    3328        super(self.__class__, self).__init__(parent) 
     29        from qtconsole.inprocess import QtInProcessKernelManager 
     30        from IPython.lib import guisupport 
    3431        app = guisupport.get_app_qt4() 
    3532 
    36        # Create an in-process kernel 
     33        # Create an in-process kernel 
    3734        kernel_manager = QtInProcessKernelManager() 
    3835        kernel_manager.start_kernel() 
Note: See TracChangeset for help on using the changeset viewer.