Fixed an issue in the module parser that cause a wrong type to be returned.

Mon, 10 Jan 2011 16:42:01 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 10 Jan 2011 16:42:01 +0100
changeset 841
0d379ff260df
parent 840
7d86780fea93
child 842
984b5535cd26

Fixed an issue in the module parser that cause a wrong type to be returned.

Utilities/ModuleParser.py file | annotate | diff | comparison | revisions
--- a/Utilities/ModuleParser.py	Sun Jan 09 19:56:08 2011 +0100
+++ b/Utilities/ModuleParser.py	Mon Jan 10 16:42:01 2011 +0100
@@ -23,6 +23,7 @@
 
 import Utilities
 from functools import reduce
+import Preferences
 
 __all__ = ["Module", "Class", "Function", "RbModule", "readModule"]
 
@@ -1072,7 +1073,11 @@
         @return type of the modules's source (string)
         """
         if self.type in [imp.PY_SOURCE, PTL_SOURCE]:
-            type = "Python"
+            py3ExtList = Preferences.getDebugger("Python3Extensions").split()
+            if self.file.endswith(tuple(py3ExtList)):
+                type = "Python3"
+            else:
+                type = "Python2"
         elif self.type == RB_SOURCE:
             type = "Ruby"
         else:

eric ide

mercurial