Hey everyone,
I'm dealing with a Virtuozzo server and want to automate logging into each container and issuing a few commands in Python by creating a subprocess for 'vzctl enter '.
Here is the snippet that I'm working on right now -
#!/usr/bin/python
import subprocess
print 'Start'
proc = subprocess.Popen(['vzctl enter 123'],
stdout=subprocess.PIPE,
stdin=subprocess.PIPE,
shell=True)
print proc.communicate('whoami')[0]
print 'Finished'
But the output I see everytime is -
Unable to get term attr: Invalid argument
Unable to restore term attr: Invalid argument
I really think this is a BASH error, can anyone give me a suggestion?