DebugClients/Python/PyProfile.py

branch
jsonrpc
changeset 5132
a094eee9f862
parent 4631
5c1a96925da4
diff -r 889ed5ff7a68 -r a094eee9f862 DebugClients/Python/PyProfile.py
--- a/DebugClients/Python/PyProfile.py	Sat Sep 03 18:01:19 2016 +0200
+++ b/DebugClients/Python/PyProfile.py	Sat Sep 03 18:02:37 2016 +0200
@@ -117,10 +117,14 @@
         if not isinstance(frame, profile.Profile.fake_frame) and \
                 '__file__' in frame.f_globals:
             root, ext = os.path.splitext(frame.f_globals['__file__'])
-            if ext == '.pyc' or ext == '.py':
+            if ext in ['.pyc', '.py', '.py2', '.pyo']:
                 fixedName = root + '.py'
                 if os.path.exists(fixedName):
                     return fixedName
+                
+                fixedName = root + '.py2'
+                if os.path.exists(fixedName):
+                    return fixedName
 
         return frame.f_code.co_filename
 

eric ide

mercurial