Changeset 5af6f58 in sasview
- Timestamp:
- Apr 8, 2017 9:31:56 AM (8 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:
- 38beeab
- Parents:
- 9c923a3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasview/sasview.py
r9c923a3 r5af6f58 12 12 ################################################################################ 13 13 import os 14 import os.path 14 15 import sys 15 16 import logging … … 19 20 logger = logging.getLogger(__name__) 20 21 if not logger.root.handlers: 21 LOGGER_CONFIG_FILE = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'logging.ini') 22 # Scripts running under py2exe do not have a __file__ global. Detect this and use sys.argv[0] instead. 23 try: 24 LOGGER_CONFIG_FILE = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'logging.ini') 25 except NameError: # We are the main py2exe script, not a module 26 LOGGER_CONFIG_FILE = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 'logging.ini') 22 27 logging.config.fileConfig(LOGGER_CONFIG_FILE, disable_existing_loggers=False) 23 28 logging.captureWarnings(True)
Note: See TracChangeset
for help on using the changeset viewer.