Changeset f36e01f in sasview for sasview


Ignore:
Timestamp:
Apr 11, 2017 6:08:57 AM (7 years ago)
Author:
Ricardo Ferraz Leal <ricleal@…>
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
Message:

Some pylint enhancements

Location:
sasview
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sasview/logger_config.py

    r09983d1 rf36e01f  
    11from __future__ import print_function 
     2 
     3import logging 
     4import logging.config 
     5import os 
     6import os.path 
     7 
     8import pkg_resources 
     9 
    210 
    311''' 
     
    513''' 
    614 
    7 import logging 
    8 import logging.config 
    9 import os 
    10 import os.path 
    11 import pkg_resources 
    1215 
    1316class SetupLogger(object): 
     
    2124 
    2225    def config_production(self): 
    23         ''' 
    24         ''' 
    2526        logger = logging.getLogger(self.name) 
    2627        if not logger.root.handlers: 
     
    4041 
    4142    def _read_config_file(self): 
    42         ''' 
    43         ''' 
    4443        if self.config_file is not None: 
    4544            logging.config.fileConfig(self.config_file) 
  • sasview/sasview.py

    ra5a74e9 rf36e01f  
    44""" 
    55################################################################################ 
    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. 
     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. 
    99# 
    10 #See the license text in license.txt 
     10# See the license text in license.txt 
    1111# 
    12 #copyright 2009, University of Tennessee 
     12# copyright 2009, University of Tennessee 
    1313################################################################################ 
    1414import os 
    1515import os.path 
    1616import sys 
    17 import logging 
    18 import logging.config 
    1917import traceback 
    2018 
     
    2220 
    2321logger = SetupLogger(__name__).config_production() 
     22 
    2423 
    2524# Log the start of the session 
     
    5554import wxcruft 
    5655wxcruft.call_later_fix() 
    57 #wxcruft.trace_new_id() 
     56# wxcruft.trace_new_id() 
    5857 
    59 #Always use private .matplotlib setup to avoid conflicts with other 
    60 #uses of matplotlib 
    61 #Have to check if .sasview exists first 
     58# Always use private .matplotlib setup to avoid conflicts with other 
     59# uses of matplotlib 
     60# Have to check if .sasview exists first 
    6261sasdir = os.path.join(os.path.expanduser("~"),'.sasview') 
    6362if not os.path.exists(sasdir): 
     
    7271from sas.sasgui.guiframe.gui_style import GUIFRAME 
    7372from welcome_panel import WelcomePanel 
    74 # For py2exe, import config here 
    75 import local_config 
     73 
    7674PLUGIN_MODEL_DIR = 'plugin_models' 
    7775APP_NAME = 'SasView' 
     
    8785        """ 
    8886        """ 
    89         #from gui_manager import ViewApp 
     87        # from gui_manager import ViewApp 
    9088        self.gui = gui_manager.SasViewApp(0) 
    9189        # Set the application manager for the GUI 
     
    116114            logger.error(traceback.format_exc()) 
    117115 
    118         #Invariant perspective 
     116        # Invariant perspective 
    119117        try: 
    120118            import sas.sasgui.perspectives.invariant as module 
     
    134132            logger.error("Unable to load corfunc module") 
    135133 
    136         #Calculator perspective 
     134        # Calculator perspective 
    137135        try: 
    138136            import sas.sasgui.perspectives.calculator as module 
     
    153151                                                        APP_NAME) 
    154152            logger.error(traceback.format_exc()) 
    155  
    156153 
    157154        # Add welcome page 
     
    174171    if len(sys.argv) > 1: 
    175172        ## Run sasview as an interactive python interpreter 
    176         #if sys.argv[1] == "-i": 
     173        # if sys.argv[1] == "-i": 
    177174        #    sys.argv = ["ipython", "--pylab"] 
    178175        #    from IPython import start_ipython 
     
    188185        SasView() 
    189186 
     187 
    190188if __name__ == "__main__": 
    191189    run() 
  • sasview/setup_exe.py

    rc04fb72 rf36e01f  
    6262        sys.argv.remove('--extrapath') 
    6363except: 
    64     print "Error processing extra python path needed to build SasView\n  %s" % \ 
    65                 sys.exc_value 
     64    print("Error processing extra python path needed to build SasView\n  %s" % \ 
     65                sys.exc_value) 
    6666 
    6767 
     
    8383        modulefinder.AddPackagePath(win32_folder, p) 
    8484    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) 
    9392 
    9493except ImportError: 
     
    167166        self.copyright = "copyright 2009 - 2016" 
    168167        self.name = "SasView" 
    169          
     168 
    170169# 
    171170# Adapted from http://www.py2exe.org/index.cgi/MatPlotLib 
     
    341340    ]) 
    342341packages.append('periodictable.core') # not found automatically 
    343 #packages.append('IPython') 
     342# packages.append('IPython') 
    344343includes = ['site', 'lxml._elementpath', 'lxml.etree'] 
    345344 
     
    374373    other_resources = [(24, 1, manifest)], 
    375374    dest_base = "SasView" 
    376     ) 
     375) 
    377376 
    378377# bundle_option = 2 
Note: See TracChangeset for help on using the changeset viewer.