Utilities/ModuleParser.py

changeset 841
0d379ff260df
parent 791
9ec2ac20e54e
child 945
8cd4d08fa9f6
child 1352
0d0d42ee74c4
diff -r 7d86780fea93 -r 0d379ff260df Utilities/ModuleParser.py
--- 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