4.1.3. sciexp2.exprun.spur.with_pid¶
Methods
-
class
with_pid(func=None)¶ Bases:
objectDecorator to define a kill argument that takes the process’ pid.
To be used as an element in the kill argument to a shell’s run or spawn method:
shell.run(["sudo", "program"], kill=["sudo", "kill", with_pid()])
Can be used in three ways, depending on the type of func: - None: replace with the stringified process pid. - str: format with the process’ pid on the
pidkey. - otherwise: call with the pid as an argument.