eric6/DebugClients/Python/PyProfile.py

changeset 7637
c878e8255972
parent 7628
f904d0eef264
child 7639
422fd05e9c91
equal deleted inserted replaced
7636:61566f35ab22 7637:c878e8255972
9 import os 9 import os
10 import marshal 10 import marshal
11 import profile 11 import profile
12 import atexit 12 import atexit
13 import pickle # secok 13 import pickle # secok
14 import sys
15 14
16 15
17 class PyProfile(profile.Profile): 16 class PyProfile(profile.Profile):
18 """ 17 """
19 Class extending the standard Python profiler with additional methods. 18 Class extending the standard Python profiler with additional methods.
117 code over a network... This logic deals with that. 116 code over a network... This logic deals with that.
118 117
119 @param frame the frame object 118 @param frame the frame object
120 @return fixed up file name (string) 119 @return fixed up file name (string)
121 """ 120 """
122 if sys.version_info[0] == 2: 121 versionExt = '.py3'
123 versionExt = '.py2'
124 else:
125 versionExt = '.py3'
126 122
127 # get module name from __file__ 123 # get module name from __file__
128 if (not isinstance(frame, profile.Profile.fake_frame) and 124 if (not isinstance(frame, profile.Profile.fake_frame) and
129 '__file__' in frame.f_globals): 125 '__file__' in frame.f_globals):
130 root, ext = os.path.splitext(frame.f_globals['__file__']) 126 root, ext = os.path.splitext(frame.f_globals['__file__'])

eric ide

mercurial