Changeset 87bff18 in sasview for DataLoader
- Timestamp:
- Jul 2, 2008 6:13:17 PM (16 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.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 73b1c72
- Parents:
- 6d19988
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/loader.py
r6d19988 r87bff18 25 25 26 26 try: 27 print"name",name28 print "path",path29 print imp.find_module(name, path)30 27 (file, path, info) = imp.find_module(name, path) 31 print"file",file32 print "path", path33 print "info",info34 print"hasattr",imp.load_module( name, file, item, info )35 28 module = imp.load_module( name, file, item, info ) 36 print"module", module37 38 29 if hasattr(module, "Reader"): 39 print "went here"40 30 try: 41 31 plugins.append(module.Reader()) … … 43 33 log("Error accessing Reader in %s\n %s" % (name, sys.exc_value)) 44 34 except : 45 print"Error importing %s\n %s" % (name,sys.exc_value)46 35 log("Error importing %s\n %s" % (name, sys.exc_value)) 47 36 finally: … … 101 90 def __setitem__(self, ext=None, reader=None): 102 91 if reader==None: 103 print os.getcwd()104 print os.path.isdir('plugins')105 print "absolute path : ",os.path.abspath('plugins')106 92 plugReader=None 107 93 if os.path.isdir('plugins'): 108 print "went here"109 94 plugReader=_findReaders('plugins')# import all module in plugins 110 95 elif os.path.isdir('../plugins'): 111 96 plugReader=_findReaders('../plugins') 112 97 if plugReader !=None: 113 print "this is plugreader",plugReader114 98 for preader in plugReader:# for each modules takes list of extensions 115 99 #print preader.ext … … 119 103 self.readers[ext] = [] 120 104 self.readers[ext].insert(0,preader) 121 print "extension",ext122 print "readers",self.readers123 105 else: 124 106 if ext not in self.readers:
Note: See TracChangeset
for help on using the changeset viewer.