- Timestamp:
- Apr 11, 2017 6:08:57 AM (7 years ago)
- Branches:
- master, 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, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b854587
- Parents:
- 09983d1
- Location:
- sasview
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasview/logger_config.py
r09983d1 rf36e01f 1 1 from __future__ import print_function 2 3 import logging 4 import logging.config 5 import os 6 import os.path 7 8 import pkg_resources 9 2 10 3 11 ''' … … 5 13 ''' 6 14 7 import logging8 import logging.config9 import os10 import os.path11 import pkg_resources12 15 13 16 class SetupLogger(object): … … 21 24 22 25 def config_production(self): 23 '''24 '''25 26 logger = logging.getLogger(self.name) 26 27 if not logger.root.handlers: … … 40 41 41 42 def _read_config_file(self): 42 '''43 '''44 43 if self.config_file is not None: 45 44 logging.config.fileConfig(self.config_file) -
sasview/sasview.py
ra5a74e9 rf36e01f 4 4 """ 5 5 ################################################################################ 6 # This software was developed by the University of Tennessee as part of the7 # Distributed Data Analysis of Neutron Scattering Experiments (DANSE)8 # project funded by the US National Science Foundation.6 # This software was developed by the University of Tennessee as part of the 7 # Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 8 # project funded by the US National Science Foundation. 9 9 # 10 # See the license text in license.txt10 # See the license text in license.txt 11 11 # 12 # copyright 2009, University of Tennessee12 # copyright 2009, University of Tennessee 13 13 ################################################################################ 14 14 import os 15 15 import os.path 16 16 import sys 17 import logging18 import logging.config19 17 import traceback 20 18 … … 22 20 23 21 logger = SetupLogger(__name__).config_production() 22 24 23 25 24 # Log the start of the session … … 55 54 import wxcruft 56 55 wxcruft.call_later_fix() 57 # wxcruft.trace_new_id()56 # wxcruft.trace_new_id() 58 57 59 # Always use private .matplotlib setup to avoid conflicts with other60 # uses of matplotlib61 # Have to check if .sasview exists first58 # Always use private .matplotlib setup to avoid conflicts with other 59 # uses of matplotlib 60 # Have to check if .sasview exists first 62 61 sasdir = os.path.join(os.path.expanduser("~"),'.sasview') 63 62 if not os.path.exists(sasdir): … … 72 71 from sas.sasgui.guiframe.gui_style import GUIFRAME 73 72 from welcome_panel import WelcomePanel 74 # For py2exe, import config here 75 import local_config 73 76 74 PLUGIN_MODEL_DIR = 'plugin_models' 77 75 APP_NAME = 'SasView' … … 87 85 """ 88 86 """ 89 # from gui_manager import ViewApp87 # from gui_manager import ViewApp 90 88 self.gui = gui_manager.SasViewApp(0) 91 89 # Set the application manager for the GUI … … 116 114 logger.error(traceback.format_exc()) 117 115 118 # Invariant perspective116 # Invariant perspective 119 117 try: 120 118 import sas.sasgui.perspectives.invariant as module … … 134 132 logger.error("Unable to load corfunc module") 135 133 136 # Calculator perspective134 # Calculator perspective 137 135 try: 138 136 import sas.sasgui.perspectives.calculator as module … … 153 151 APP_NAME) 154 152 logger.error(traceback.format_exc()) 155 156 153 157 154 # Add welcome page … … 174 171 if len(sys.argv) > 1: 175 172 ## Run sasview as an interactive python interpreter 176 # if sys.argv[1] == "-i":173 # if sys.argv[1] == "-i": 177 174 # sys.argv = ["ipython", "--pylab"] 178 175 # from IPython import start_ipython … … 188 185 SasView() 189 186 187 190 188 if __name__ == "__main__": 191 189 run() -
sasview/setup_exe.py
rc04fb72 rf36e01f 62 62 sys.argv.remove('--extrapath') 63 63 except: 64 print 65 sys.exc_value 64 print("Error processing extra python path needed to build SasView\n %s" % \ 65 sys.exc_value) 66 66 67 67 … … 83 83 modulefinder.AddPackagePath(win32_folder, p) 84 84 for extra in ["win32com.shell", "win32com.adsi", "win32com.axcontrol", 85 "win32com.axscript", "win32com.bits", "win32com.ifilter", 86 "win32com.internet", "win32com.mapi", "win32com.propsys", 87 "win32com.taskscheduler"]: 88 89 __import__(extra) 90 m = sys.modules[extra] 91 for p in m.__path__[1:]: 92 modulefinder.AddPackagePath(extra, p) 85 "win32com.axscript", "win32com.bits", "win32com.ifilter", 86 "win32com.internet", "win32com.mapi", "win32com.propsys", 87 "win32com.taskscheduler"]: 88 __import__(extra) 89 m = sys.modules[extra] 90 for p in m.__path__[1:]: 91 modulefinder.AddPackagePath(extra, p) 93 92 94 93 except ImportError: … … 167 166 self.copyright = "copyright 2009 - 2016" 168 167 self.name = "SasView" 169 168 170 169 # 171 170 # Adapted from http://www.py2exe.org/index.cgi/MatPlotLib … … 341 340 ]) 342 341 packages.append('periodictable.core') # not found automatically 343 # packages.append('IPython')342 # packages.append('IPython') 344 343 includes = ['site', 'lxml._elementpath', 'lxml.etree'] 345 344 … … 374 373 other_resources = [(24, 1, manifest)], 375 374 dest_base = "SasView" 376 375 ) 377 376 378 377 # bundle_option = 2
Note: See TracChangeset
for help on using the changeset viewer.