Index: src/sas/dataloader/loader.py
===================================================================
--- src/sas/dataloader/loader.py	(revision 474951463fb21d605fa6dd0e444910b27b09260c)
+++ src/sas/dataloader/loader.py	(revision f06d7fc5ba7d17d52edee3930be23f50d285aafc)
@@ -2,11 +2,11 @@
     File handler to support different file extensions.
     Uses reflectometry's registry utility.
-    
+
     The default readers are found in the 'readers' sub-module
     and registered by default at initialization time.
-    
+
     To add a new default reader, one must register it in
     the register_readers method found in readers/__init__.py.
-    
+
     A utility method (find_plugins) is available to inspect
     a directory (for instance, a user plug-in directory) and
@@ -37,26 +37,19 @@
     Readers and writers are supported.
     """
-    
+
     def __init__(self):
         super(Registry, self).__init__()
-        
+
         ## Writers
         self.writers = {}
-        
+
         ## List of wildcards
         self.wildcards = ['All (*.*)|*.*']
-        
+
         ## Creation time, for testing
         self._created = time.time()
-        
+
         # Register default readers
         readers.read_associations(self)
-        
-        #TODO: remove the following line when ready to switch to
-        #the new default readers
-        #readers.register_readers(self._identify_plugin)
-        
-        # Look for plug-in readers
-        #self.find_plugins('plugins')
 
     def load(self, path, format=None):
@@ -82,5 +75,5 @@
                 cansas_loader = cansas_reader.Reader()
                 return cansas_loader.read(path)
-            
+
     def find_plugins(self, dir):
         """
@@ -88,7 +81,6 @@
         can be used to inspect user plug-in directories to
         find new readers/writers.
-        
+
         :param dir: directory to search into
-        
         :return: number of readers found
         """
@@ -101,5 +93,5 @@
         if not os.path.isdir(temp_path):
             temp_path = os.path.join(os.path.dirname(sys.path[0]), dir)
-        
+
         dir = temp_path
         # Check whether the directory exists
@@ -109,9 +101,9 @@
             logging.warning(msg)
             return readers_found
-        
+
         for item in os.listdir(dir):
             full_path = os.path.join(dir, item)
             if os.path.isfile(full_path):
-                
+
                 # Process python files
                 if item.endswith('.py'):
@@ -126,5 +118,5 @@
                         msg += "%s\n  %s" % (item, sys.exc_value)
                         logging.error(msg)
-                            
+
                 # Process zip files
                 elif item.endswith('.zip'):
@@ -133,5 +125,5 @@
                         zfile = ZipFile(item)
                         nlist = zfile.namelist()
-                        
+
                         sys.path.insert(0, item)
                         for mfile in nlist:
@@ -141,5 +133,5 @@
                                 fullname = os.path.splitext(fullname)[0]
                                 module = __import__(fullname, globals(),
-                                                     locals(), [""])
+                                                    locals(), [""])
                                 if self._identify_plugin(module):
                                     readers_found += 1
@@ -148,12 +140,12 @@
                                 msg += " %s\n  %s" % (mfile, sys.exc_value)
                                 logging.error(msg)
-                            
+
                     except:
                         msg = "Loader: Error importing "
                         msg += " %s\n  %s" % (item, sys.exc_value)
                         logging.error(msg)
-                     
+
         return readers_found
-    
+
     def associate_file_type(self, ext, module):
         """
@@ -161,10 +153,10 @@
         Reader class. If so, APPEND it to readers and (potentially)
         to the list of writers for the given extension
-        
+
         :param ext: file extension [string]
         :param module: module object
         """
         reader_found = False
-        
+
         if hasattr(module, "Reader"):
             try:
@@ -177,15 +169,15 @@
 
                 reader_found = True
-                
+
                 # Keep track of wildcards
                 type_name = module.__name__
                 if hasattr(loader, 'type_name'):
                     type_name = loader.type_name
-                    
+
                 wcard = "%s files (*%s)|*%s" % (type_name, ext.lower(),
-                                                 ext.lower())
+                                                ext.lower())
                 if wcard not in self.wildcards:
                     self.wildcards.append(wcard)
-                            
+
                 # Check whether writing is supported
                 if hasattr(loader, 'write'):
@@ -194,5 +186,5 @@
                     # Append the new writer to the list
                     self.writers[ext].append(loader.write)
-                        
+
             except:
                 msg = "Loader: Error accessing"
@@ -204,10 +196,10 @@
         """
         Append a reader object to readers
-        
+
         :param ext: file extension [string]
         :param module: reader object
         """
         reader_found = False
-        
+
         try:
             # Find supported extensions
@@ -218,14 +210,14 @@
 
             reader_found = True
-            
+
             # Keep track of wildcards
             if hasattr(loader, 'type_name'):
                 type_name = loader.type_name
-                
+
                 wcard = "%s files (*%s)|*%s" % (type_name, ext.lower(),
                                                 ext.lower())
                 if wcard not in self.wildcards:
                     self.wildcards.append(wcard)
-                 
+
         except:
             msg = "Loader: Error accessing Reader "
@@ -236,12 +228,12 @@
     def _identify_plugin(self, module):
         """
-        Look into a module to find whether it contains a 
+        Look into a module to find whether it contains a
         Reader class. If so, add it to readers and (potentially)
         to the list of writers.
         :param module: module object
-        
+
         """
         reader_found = False
-        
+
         if hasattr(module, "Reader"):
             try:
@@ -256,5 +248,5 @@
 
                     reader_found = True
-                    
+
                     # Keep track of wildcards
                     type_name = module.__name__
@@ -262,8 +254,8 @@
                         type_name = loader.type_name
                     wcard = "%s files (*%s)|*%s" % (type_name, ext.lower(),
-                                                     ext.lower())
+                                                    ext.lower())
                     if wcard not in self.wildcards:
                         self.wildcards.append(wcard)
-                            
+
                 # Check whether writing is supported
                 if hasattr(loader, 'write'):
@@ -272,5 +264,5 @@
                             self.writers[ext] = []
                         self.writers[ext].insert(0, loader.write)
-                        
+
             except:
                 msg = "Loader: Error accessing Reader"
@@ -282,5 +274,4 @@
         """
         :return: the loader associated with the file type of path.
-        
         :Raises ValueError: if file type is not known.
         """
@@ -312,5 +303,4 @@
         Raises ValueError if no writer is available.
         Raises KeyError if format is not available.
-        
         May raise a writer-defined exception if writer fails.
         """
@@ -327,5 +317,5 @@
         raise  # reraises last exception
 
-        
+
 class Loader(object):
     """
@@ -334,5 +324,5 @@
     ## Registry instance
     __registry = Registry()
-    
+
     def associate_file_type(self, ext, module):
         """
@@ -340,5 +330,5 @@
         Reader class. If so, append it to readers and (potentially)
         to the list of writers for the given extension
-        
+
         :param ext: file extension [string]
         :param module: module object
@@ -349,5 +339,5 @@
         """
         Append a reader object to readers
-        
+
         :param ext: file extension [string]
         :param module: reader object
@@ -358,5 +348,5 @@
         """
         Load a file
-        
+
         :param file: file name (path)
         :param format: specified format to use (optional)
@@ -364,5 +354,5 @@
         """
         return self.__registry.load(file, format)
-    
+
     def save(self, file, data, format):
         """
@@ -370,8 +360,8 @@
         :param file: file name (path)
         :param data: DataInfo object
-        :param format: format to write the data in 
+        :param format: format to write the data in
         """
         return self.__registry.save(file, data, format)
-        
+
     def _get_registry_creation_time(self):
         """
@@ -380,13 +370,16 @@
         """
         return self.__registry._created
-    
-    def find_plugins(self, dir):
+
+    def find_plugins(self, directory):
         """
         Find plugins in a given directory
-        
+
         :param dir: directory to look into to find new readers/writers
         """
-        return self.__registry.find_plugins(dir)
-    
+        return self.__registry.find_plugins(directory)
+
     def get_wildcards(self):
+        """
+        Return the list of wildcards
+        """
         return self.__registry.wildcards
