Changeset 0719c8c in sasview


Ignore:
Timestamp:
Apr 10, 2017 3:56:18 AM (8 years ago)
Author:
wojciech
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:
d9df833
Parents:
fc22533
Message:

Trying to fix logger import by setting absolute path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • run.py

    rfc22533 r0719c8c  
    2323from os.path import abspath, dirname 
    2424 
    25 try: 
    26     # running from a local computer as developer 
    27     from sasview.logger_config import SetupLogger 
    28 except ImportError: 
    29     from logger_config import SetupLogger 
    30  
    31 l = SetupLogger(__name__) 
    32 logger = l.config_development() 
    3325 
    3426def addpath(path): 
     
    4436    os.environ['PYTHONPATH'] = PYTHONPATH 
    4537    sys.path.insert(0, path) 
     38 
     39root = abspath(dirname(__file__)) 
     40addpath(joinpath(root, 'sasview')) 
     41from logger_config import SetupLogger 
     42 
     43#try: 
     44#    # running from a local computer as developer 
     45#    from sasview.logger_config import SetupLogger 
     46#except ImportError: 
     47#    from logger_config import SetupLogger 
     48 
     49l = SetupLogger(__name__) 
     50logger = l.config_development() 
    4651 
    4752@contextmanager 
Note: See TracChangeset for help on using the changeset viewer.