Changeset 481ff26 in sasview for src/sas/qtgui/GuiUtils.py
- Timestamp:
- Jul 4, 2016 5:32:49 AM (8 years ago)
- 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:
- f0f309d
- Parents:
- f82ab8c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GuiUtils.py
rf82ab8c r481ff26 5 5 import os 6 6 import sys 7 import time8 7 import imp 9 8 import warnings 10 import re11 9 import webbrowser 12 10 import urlparse … … 14 12 warnings.simplefilter("ignore") 15 13 import logging 16 import traceback17 14 18 15 from PyQt4 import QtCore … … 74 71 return userdir 75 72 76 def _find_local_config( file, path):73 def _find_local_config(confg_file, path): 77 74 """ 78 75 Find configuration file for the current application … … 81 78 fObj = None 82 79 try: 83 fObj, path_config, descr = imp.find_module( file, [path])84 config_module = imp.load_module( file, fObj, path_config, descr)80 fObj, path_config, descr = imp.find_module(confg_file, [path]) 81 config_module = imp.load_module(confg_file, fObj, path_config, descr) 85 82 except: 86 logging.error("Error loading %s/%s: %s" % (path, file, sys.exc_value))83 logging.error("Error loading %s/%s: %s" % (path, confg_file, sys.exc_value)) 87 84 finally: 88 85 if fObj is not None: 89 86 fObj.close() 90 logging.info("GuiManager loaded %s/%s" % (path, file))87 logging.info("GuiManager loaded %s/%s" % (path, confg_file)) 91 88 return config_module 92 89 … … 238 235 else: 239 236 # otherwise just add a naked item 240 info_item = QtGui.QStandardItem("Info") 237 info_item = QtGui.QStandardItem("Info") 241 238 242 239 # Add the actual Data1D/Data2D object … … 274 271 # TODO: assure item type is correct (either data1/2D or Plotter) 275 272 plot_data.append(item_2.child(0).data().toPyObject()) 276 273 277 274 return plot_data 278 275 … … 286 283 info_item = QtGui.QStandardItem("Info") 287 284 288 title_item = QtGui.QStandardItem("Title: "+ data.title)285 title_item = QtGui.QStandardItem("Title: " + data.title) 289 286 info_item.appendRow(title_item) 290 run_item = QtGui.QStandardItem("Run: "+ str(data.run))287 run_item = QtGui.QStandardItem("Run: " + str(data.run)) 291 288 info_item.appendRow(run_item) 292 type_item = QtGui.QStandardItem("Type: "+ str(data.__class__.__name__))289 type_item = QtGui.QStandardItem("Type: " + str(data.__class__.__name__)) 293 290 info_item.appendRow(type_item) 294 291 295 292 if data.path: 296 path_item = QtGui.QStandardItem("Path: "+ data.path)293 path_item = QtGui.QStandardItem("Path: " + data.path) 297 294 info_item.appendRow(path_item) 298 295 299 296 if data.instrument: 300 instr_item 297 instr_item = QtGui.QStandardItem("Instrument: " + data.instrument) 301 298 info_item.appendRow(instr_item) 302 299
Note: See TracChangeset
for help on using the changeset viewer.