Utilities/ClassBrowsers/__init__.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2847
1843ef6e2656
parent 2997
7f0ef975da9e
child 3060
5883ce99ee12
--- a/Utilities/ClassBrowsers/__init__.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Utilities/ClassBrowsers/__init__.py	Fri Oct 18 23:00:41 2013 +0200
@@ -40,16 +40,18 @@
 
 
 def readmodule(module, path=[], isPyFile=False):
-    '''
-    Read a source file and return a dictionary of classes, functions, modules, etc. .
+    """
+    Read a source file and return a dictionary of classes, functions, modules,
+    etc. .
     
-    The real work of parsing the source file is delegated to the individual file
-    parsers.
+    The real work of parsing the source file is delegated to the individual
+    file parsers.
 
     @param module name of the source file (string)
     @param path path the file should be searched in (list of strings)
+    @param isPyFile flag indicating a Python file (boolean)
     @return the resulting dictionary
-    '''
+    """
     ext = os.path.splitext(module)[1].lower()
     
     if ext in __extensions["IDL"]:
@@ -90,6 +92,7 @@
     
     @param name filename or modulename to search for (string)
     @param path search path (list of strings)
+    @param isPyFile flag indicating a Python file (boolean)
     @return tuple of the open file, pathname and description. Description
         is a tuple of file suffix, file mode and file type)
     @exception ImportError The file or module wasn't found.
@@ -130,9 +133,10 @@
     try:
         return imp.find_module(name, path)
     except ImportError:
-        if name.lower().endswith(tuple(Preferences.getPython("PythonExtensions") + \
-                                       Preferences.getPython("Python3Extensions"))) or \
-           isPyFile:
+        if name.lower().endswith(
+                tuple(Preferences.getPython("PythonExtensions") +
+                      Preferences.getPython("Python3Extensions"))) or \
+                isPyFile:
             for p in path:      # search in path
                 pathname = os.path.join(p, name)
                 if os.path.exists(pathname):

eric ide

mercurial