eric6/DebugClients/Python/PyProfile.py

changeset 7250
d8bdc55aee1a
parent 6942
2602857055c5
child 7360
9190402e4505
equal deleted inserted replaced
7249:0bf517e60f54 7250:d8bdc55aee1a
123 versionExt = '.py2' 123 versionExt = '.py2'
124 else: 124 else:
125 versionExt = '.py3' 125 versionExt = '.py3'
126 126
127 # get module name from __file__ 127 # get module name from __file__
128 if not isinstance(frame, profile.Profile.fake_frame) and \ 128 if (not isinstance(frame, profile.Profile.fake_frame) and
129 '__file__' in frame.f_globals: 129 '__file__' in frame.f_globals):
130 root, ext = os.path.splitext(frame.f_globals['__file__']) 130 root, ext = os.path.splitext(frame.f_globals['__file__'])
131 if ext in ['.pyc', '.py', versionExt, '.pyo']: 131 if ext in ['.pyc', '.py', versionExt, '.pyo']:
132 fixedName = root + '.py' 132 fixedName = root + '.py'
133 if os.path.exists(fixedName): 133 if os.path.exists(fixedName):
134 return fixedName 134 return fixedName

eric ide

mercurial