205 # The list of regexp objects to filter variables against |
205 # The list of regexp objects to filter variables against |
206 self.globalsFilterObjects = [] |
206 self.globalsFilterObjects = [] |
207 self.localsFilterObjects = [] |
207 self.localsFilterObjects = [] |
208 |
208 |
209 self.pendingResponse = DebugProtocol.ResponseOK |
209 self.pendingResponse = DebugProtocol.ResponseOK |
210 self.fncache = {} |
210 self._fncache = {} |
211 self.dircache = [] |
211 self.dircache = [] |
212 self.inRawMode = 0 |
212 self.inRawMode = 0 |
213 self.mainProcStr = None # used for the passive mode |
213 self.mainProcStr = None # used for the passive mode |
214 self.passive = 0 # used to indicate the passive mode |
214 self.passive = 0 # used to indicate the passive mode |
215 self.running = None |
215 self.running = None |
1116 """ |
1116 """ |
1117 if os.path.isabs(fn): |
1117 if os.path.isabs(fn): |
1118 return fn |
1118 return fn |
1119 |
1119 |
1120 # Check the cache. |
1120 # Check the cache. |
1121 if fn in self.fncache: |
1121 if fn in self._fncache: |
1122 return self.fncache[fn] |
1122 return self._fncache[fn] |
1123 |
1123 |
1124 # Search sys.path. |
1124 # Search sys.path. |
1125 for p in sys.path: |
1125 for p in sys.path: |
1126 afn = os.path.abspath(os.path.join(p, fn)) |
1126 afn = os.path.abspath(os.path.join(p, fn)) |
1127 nafn = os.path.normcase(afn) |
1127 nafn = os.path.normcase(afn) |
1128 |
1128 |
1129 if os.path.exists(nafn): |
1129 if os.path.exists(nafn): |
1130 self.fncache[fn] = afn |
1130 self._fncache[fn] = afn |
1131 d = os.path.dirname(afn) |
1131 d = os.path.dirname(afn) |
1132 if (d not in sys.path) and (d not in self.dircache): |
1132 if (d not in sys.path) and (d not in self.dircache): |
1133 self.dircache.append(d) |
1133 self.dircache.append(d) |
1134 return afn |
1134 return afn |
1135 |
1135 |
1137 for p in self.dircache: |
1137 for p in self.dircache: |
1138 afn = os.path.abspath(os.path.join(p, fn)) |
1138 afn = os.path.abspath(os.path.join(p, fn)) |
1139 nafn = os.path.normcase(afn) |
1139 nafn = os.path.normcase(afn) |
1140 |
1140 |
1141 if os.path.exists(nafn): |
1141 if os.path.exists(nafn): |
1142 self.fncache[fn] = afn |
1142 self._fncache[fn] = afn |
1143 return afn |
1143 return afn |
1144 |
1144 |
1145 # Nothing found. |
1145 # Nothing found. |
1146 return fn |
1146 return fn |
1147 |
1147 |
1773 port = os.getenv('ERICPORT', 42424) |
1773 port = os.getenv('ERICPORT', 42424) |
1774 |
1774 |
1775 remoteAddress = self.__resolveHost(host) |
1775 remoteAddress = self.__resolveHost(host) |
1776 self.connectDebugger(port, remoteAddress, redirect) |
1776 self.connectDebugger(port, remoteAddress, redirect) |
1777 |
1777 |
1778 self.fncache = {} |
1778 self._fncache = {} |
1779 self.dircache = [] |
1779 self.dircache = [] |
1780 sys.argv = progargs[:] |
1780 sys.argv = progargs[:] |
1781 sys.argv[0] = os.path.abspath(sys.argv[0]) |
1781 sys.argv[0] = os.path.abspath(sys.argv[0]) |
1782 sys.path = self.__getSysPath(os.path.dirname(sys.argv[0])) |
1782 sys.path = self.__getSysPath(os.path.dirname(sys.argv[0])) |
1783 if wd == '': |
1783 if wd == '': |