christophe31 / screenutils Goto Github PK
View Code? Open in Web Editor NEWHandle gnu-screen: creates/close/list sessions, injects commands...
License: Other
Handle gnu-screen: creates/close/list sessions, injects commands...
License: Other
When the user types list_screens(), new instances of already existing Screen instances are returned. This is a problem, because if a user has enabled logs in a screen session, the user will not be able to get the logs from Screen instances returned by list_screens(). Here is an example scenario when the user is trying to disable and delete logs for all current screen sessions:
scr1 = Screen('scr1', True)
[detached]
There is a screen on:
46165.scr1 (Detached)
There is no screen to be detached matching 46165.
list_screens()
[<Screen 'scr1'>]
scr1.enable_logs('scr1.log')
screen_list = list_screens()
screen_list
[<Screen 'scr1'>]
for i in range(0, len(screen_list)):
... screen_list[i].disable_logs(True)
...
Traceback (most recent call last):
File "", line 2, in
File "screenutils/screen.py", line 104, in disable_logs
system('rm ' + self._logfilename)
TypeError: cannot concatenate 'str' and 'NoneType' objects
In the example above, the user created a Screen with name 'scr1' and a log file with name 'scr1.log'. But when using the Screen instance returned from list_screens(), the user is unable to delete the log file, because list_screens() creates new instances of an already existing Screen. This shouldn't be allowed. list_screens() should return references to already existing instances of Screen.
Hi guys,
I found that screenutils isn't running long commands, may be i am doing something wrong.
Here is an example -
s.send_commands('python streamdata.py '10.0.0.0/24' or 10.1.0.0/24'....................or 'xx.xx.xx.xx' ')
I got a screen but it just didn't run command in that screen. I need to run command manually.
I there anyway i can fix that.
Thanx in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.