Not really sure how to title this, since I think my issue is just that some of the methods shown in the documentation just don't work, or perhaps it's not clearly explained what is meant by a 'non-blocking' command and I'm not using this correctly:
>>> import delegator
>>> c = delegator.run('sleep infinity', block=False)
>>> c.terminate()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/delegator.py", line 176, in terminate
self.subprocess.terminate()
AttributeError: 'PopenSpawn' object has no attribute 'terminate'
>>> c.send('SIGTERM', signal=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/delegator.py", line 173, in send
self.subprocess.send_signal(s)
AttributeError: 'PopenSpawn' object has no attribute 'send_signal'
When block=False, self.subprocess becomes a pexpect.popen_spawn.PopenSpawn, which doesn't implement many methods from subprocess.Popen, including send_signal, terminate, and probably others.
Not really sure how to title this, since I think my issue is just that some of the methods shown in the documentation just don't work, or perhaps it's not clearly explained what is meant by a 'non-blocking' command and I'm not using this correctly:
When
block=False
,self.subprocess
becomes apexpect.popen_spawn.PopenSpawn
, which doesn't implement many methods fromsubprocess.Popen
, includingsend_signal
,terminate
, and probably others.