Changeset 05a9d29 in sasview
- Timestamp:
- Mar 31, 2017 9:28:38 PM (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:
- 7b15990
- Parents:
- 7cbbacd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
run.py
r18e7309 r05a9d29 20 20 from os.path import abspath, dirname, join as joinpath 21 21 22 class TeeStream: 23 def __init__(self, filename): 24 self.logfile = open(filename, 'a') 25 self.console = sys.stderr 26 def write(self, buf): 27 self.logfile.write(buf) 28 self.console.write(buf) 29 30 def tee_logging(): 31 import logging 32 stream = TeeStream(os.path.join(os.path.expanduser("~"), 'sasview.log')) 33 logging.basicConfig(level=logging.INFO, 34 format='%(asctime)s %(levelname)s %(message)s', 35 stream=stream) 22 36 23 37 def addpath(path): … … 139 153 if __name__ == "__main__": 140 154 prepare() 155 tee_logging() 141 156 from sas.sasview.sasview import run 142 157 run()
Note: See TracChangeset
for help on using the changeset viewer.