Definition at line 28 of file isDSinFAX.py.
◆ result
◆ __init__()
| isDSinFAX.Command.__init__ |
( |
| self, |
|
|
| cmd ) |
Definition at line 30 of file isDSinFAX.py.
30 def __init__(self, cmd):
31 self.cmd = cmd
32 self.process = None
33
◆ run()
| isDSinFAX.Command.run |
( |
| self, |
|
|
| timeout ) |
Definition at line 34 of file isDSinFAX.py.
34 def run(self, timeout):
35 def target():
36
37 self.process = subprocess.Popen(self.cmd, shell=True)
38 self.process.communicate()
39
40 thread = threading.Thread(target=target)
41 thread.start()
42
43 thread.join(timeout)
44 if thread.is_alive():
45 print ('Terminating process')
46 self.process.terminate()
47 thread.join()
48 return self.process.returncode
49
50
51
52
◆ cmd
| isDSinFAX.Command.cmd = cmd |
◆ process
| isDSinFAX.Command.process = None |
The documentation for this class was generated from the following file: