How to control screen processes using python How to control screen processes using python unix unix

How to control screen processes using python


Found the solution. There's a Python module called screenutils.


You could use pexpect.

There is also a fork: pexpect-u

I'm not 100% certain there isn't any limitations in pexpect compared to expect, but if you find any you can always try your hand at some tcl :)


Do you need to use screen? Because what you need sounds just like what "fabric" (made in Python) was designed for: controlling multiple remote servers from Python scripts or interactive shell.

Here is a ink to fabric overview:http://docs.fabfile.org/en/1.3.3/index.html