[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Python wrapper for gnu-screen

From: Artur Skonecki
Subject: Re: Python wrapper for gnu-screen
Date: Wed, 22 Sep 2010 19:10:41 +0200 (CEST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

screenutils seems to be an interesting project. I would love to have a
python wrapper around Screen. It would be great if screenutils exposed
interface to every command and returned output if possible: 
I use this in my code:

    def command_at(self,command,win="-1"):
        if win=="-1":
            win="-p %s"%win
        os.system('screen -S %s %s -X %s'% (,win,command))
        if l.startswith('Could not'):
            #no such window
            return -1
            return l

    def get_number_and_title(self,win):
        if msg==-1:
            return -1,-1
        number,title = msg.split("(",1)
        number = number.strip().rsplit(' ',1)[1]
        title = title.rsplit(")",1)[0]
        return number,title

Artur Skonecki

On Wed, 22 Sep 2010, Christophe, Jean-Charles Narbonne wrote:


I'm a french student and I used screen to administrate server since a long time.

I've never made personal config files or search deep in all screen features but 
developed for personal usage a lib in python for administration scripts.
(it's allow to inject code into the screens sessions, use monitoring ...).

I use it to automate things in shell flavored servers.

As I published this lib, I now ask for feedbacks from interested advenced screen
scripters/users/developers... Is this kind of tool interesting? Which feature 
should be
added? Is the gnu-screen spirit respected?

Here the package and the doc:

Here the Repository:

Here the main file:

Best regards,
Christophe Narbonne

reply via email to

[Prev in Thread] Current Thread [Next in Thread]