- Timestamp:
- Oct 1, 2014 7:12:29 PM (9 years ago)
- Location:
- branch/logging
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branch/logging/GSASIIlog.py
r1510 r1511 13 13 import wx 14 14 import GSASIIgrid as G2gd 15 import GSASIIpath 16 # Global variables 15 17 MenuBindingLookup = {} 16 18 'Lookup table for Menu buttons' … … 20 22 'Contains a list of logged actions; first item is ignored' 21 23 LogInfo = {'Logging':False, 'Tree':None, 'LastPaintAction':None} 22 'Contains a dict with values that are needed in the module'24 'Contains values that are needed in the module for past actions & object location' 23 25 24 26 # TODO: … … 34 36 # and then a LogCall('unique-string',pargs,kwargs) call inside the routine 35 37 36 debug = True38 debug = GSASIIpath.GetConfigValue('logging_debug') 37 39 #=========================================================================== 38 40 # objects for logging variables … … 541 543 return 542 544 543 LogOn() # for debug 545 if debug: LogOn() # for debug, start with logging enabled -
branch/logging/GSASIIpath.py
r1413 r1511 60 60 if newpath not in sys.path: sys.path.append(newpath) 61 61 62 # setup read of config.py, if present 63 try: 64 import config 65 configDict = config.__dict__ 66 import inspect 67 vals = [True for i in inspect.getmembers(config) if '__' not in i[0]] 68 print str(len(vals))+' values read from config file '+os.path.abspath(config.__file__) 69 except ImportError: 70 configDict = {} 71 72 def GetConfigValue(key): 73 'Return the configuration file value for key or None if not present' 74 return configDict.get(key) 75 62 76 # routines for looking a version numbers in files 63 77 version = -1
Note: See TracChangeset
for help on using the changeset viewer.