Changeset 31c5b58 in sasview for src/sas/qtgui/GuiUtils.py


Ignore:
Timestamp:
Nov 25, 2016 6:56:41 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:
3968752
Parents:
14d9c7b
Message:

Refactored to allow running with run.py.
Minor fixes to plotting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/GuiUtils.py

    re4676c8 r31c5b58  
    4646    if os.path.isfile(os.path.join(app_path, "custom_config.py")): 
    4747        app_path = os.path.abspath(app_path) 
    48         logging.info("Using application path: %s", app_path) 
     48        #logging.info("Using application path: %s", app_path) 
    4949        return app_path 
    5050 
    5151    # Next, try the current working directory 
    5252    if os.path.isfile(os.path.join(os.getcwd(), "custom_config.py")): 
    53         logging.info("Using application path: %s", os.getcwd()) 
     53        #logging.info("Using application path: %s", os.getcwd()) 
    5454        return os.path.abspath(os.getcwd()) 
    5555 
     
    5858    # clean all these module variables and put them into a config class 
    5959    # that can be passed by sasview.py. 
    60     logging.info(sys.executable) 
    61     logging.info(str(sys.argv)) 
     60    #logging.info(sys.executable) 
     61    #logging.info(str(sys.argv)) 
    6262    from sas import sasview as sasview 
    6363    app_path = os.path.dirname(sasview.__file__) 
    64     logging.info("Using application path: %s", app_path) 
     64    #logging.info("Using application path: %s", app_path) 
    6565    return app_path 
    6666 
     
    8484        config_module = imp.load_module(confg_file, fObj, path_config, descr) 
    8585    except ImportError: 
    86         logging.error("Error loading %s/%s: %s" % (path, confg_file, sys.exc_value)) 
     86        pass 
     87        #logging.error("Error loading %s/%s: %s" % (path, confg_file, sys.exc_value)) 
    8788    finally: 
    8889        if fObj is not None: 
    8990            fObj.close() 
    90     logging.info("GuiManager loaded %s/%s" % (path, confg_file)) 
     91    #logging.info("GuiManager loaded %s/%s" % (path, confg_file)) 
    9192    return config_module 
    9293 
     
    100101# application or in the installation directory 
    101102config = _find_local_config('local_config', PATH_APP) 
     103 
    102104if config is None: 
    103105    config = _find_local_config('local_config', os.getcwd()) 
     
    105107        # Didn't find local config, load the default 
    106108        import sas.sasgui.guiframe.config as config 
    107         logging.info("using default local_config") 
     109        #logging.info("using default local_config") 
    108110    else: 
    109         logging.info("found local_config in %s", os.getcwd()) 
     111        pass 
     112        #logging.info("found local_config in %s", os.getcwd()) 
    110113else: 
    111     logging.info("found local_config in %s", PATH_APP) 
     114    pass 
     115    #logging.info("found local_config in %s", PATH_APP) 
    112116 
    113117 
     
    119123    if custom_config is None: 
    120124        msgConfig = "Custom_config file was not imported" 
    121         logging.info(msgConfig) 
     125        #logging.info(msgConfig) 
    122126    else: 
    123         logging.info("using custom_config in %s", os.getcwd()) 
     127        pass 
     128        #logging.info("using custom_config in %s", os.getcwd()) 
    124129else: 
    125     logging.info("using custom_config from %s", c_conf_dir) 
     130    pass 
     131    #logging.info("using custom_config from %s", c_conf_dir) 
    126132 
    127133#read some constants from config 
     
    350356        msg = "Unable to find min/max of \n data named %s" % \ 
    351357                    data.filename 
    352         logging.error(msg) 
     358        #logging.error(msg) 
    353359        raise ValueError, msg 
    354360 
Note: See TracChangeset for help on using the changeset viewer.