Code Monkey home page Code Monkey logo

screenutils's People

Contributors

basnijholt avatar christophe31 avatar kingllama avatar rhatgadkar avatar stefanmonkey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

screenutils's Issues

list_screens() returns new instances of Screen

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.

long text command isn't working

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.