MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / set_process

Method set_process

pydevd_attach_to_process/winappdbg/thread.py:184–201  ·  view source on GitHub ↗

Manually set the parent Process object. Use with care! @type process: L{Process} @param process: (Optional) Process object. Use C{None} for no process.

(self, process=None)

Source from the content-addressed store, hash-verified

182 return self.__process
183
184 def set_process(self, process=None):
185 """
186 Manually set the parent Process object. Use with care!
187
188 @type process: L{Process}
189 @param process: (Optional) Process object. Use C{None} for no process.
190 """
191 if process is None:
192 self.dwProcessId = None
193 self.__process = None
194 else:
195 self.__load_Process_class()
196 if not isinstance(process, Process):
197 msg = "Parent process must be a Process instance, "
198 msg += "got %s instead" % type(process)
199 raise TypeError(msg)
200 self.dwProcessId = process.get_pid()
201 self.__process = process
202
203 process = property(get_process, set_process, doc="")
204

Callers 4

__init__Method · 0.95
clearMethod · 0.95
_add_threadMethod · 0.45

Calls 2

__load_Process_classMethod · 0.95
get_pidMethod · 0.45

Tested by

no test coverage detected