{ "info": { "author": "Christophe Narbonne", "author_email": "@Christophe31", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "CAUTION: this project is not maintained anymore as it's maintainer don't use it anymore\n(and switched to tmux). If you contribute a bit, you may reclaim this project.\n\n\nscreenutils\n===========\n\nscreenutils is a set of classes that should help handling gnu-screen windows.\n\nIt requires gnu-screen binary installed (named screen and in your path) to work.\n\nFeel free to report any modification you made, the whole code source is\navailable under the terms of the GPLv2 but I think about using a more permissave license (WTFPL).\n\nExample usage\n-------------\n\nExample in a python console::\n\n >>> from screenutils import list_screens, Screen\n >>> list_screens()\n []\n >>> s = Screen(\"session1\",True)\n >>> # funky prompts could reduce log visibility. Use sh or bash for best results\n >>> s.send_commands('bash')\n >>> s.enable_logs()\n >>> s.send_commands(\"df\")\n >>> print next(s.logs)\n df\n Filesystem 1K-blocks Used Available Use% Mounted on\n /dev/sda6 20161172 8084052 11052980 43% /\n none 1505916 304 1505612 1% /dev\n none 1512676 936 1511740 1% /dev/shm\n none 1512676 380 1512296 1% /var/run\n none 1512676 0 1512676 0% /var/lock\n none 1512676 0 1512676 0% /lib/init/rw\n none 20161172 8084052 11052980 43% /var/lib/ureadahead/debugfs\n /dev/sda7 403567768 196284216 186783420 52% /home\n popi@popi-laptop:~/Dev/github/screenutils$\n >>> s.disable_logs()\n >>> s = None\n >>> s = Screen(\"session1\")\n >>> s.exists\n True\n >>> s2 = Screen(\"session2\")\n >>> s2.exists\n False\n >>> s2.initialize()\n >>> s2.exists\n True\n >>> list_screens()\n [, ]\n >>>\n\n\nInstallation\n-------------\n\nYou could install screenutils from github, by doing the following::\n\n $ pip install git+http://github.com/Christophe31/screenutils.git\n\nOr by just using the packages published on Pypi, for instance with pip::\n\n $ pip install screenutils\n\nFeatures\n---------\n\n* screens listing\n* screen session creation\n* screen session closing\n* screen code insertion\n* screen monitoring/logging\n* screen session sharing with unix users (see below)\n\nCore Documentation\n------------------\n\n**Screen class**:\n\n* ``Screen(name, initialize=False)`` Create a new screen.\n\n - ``name`` (required): The name associated with the screen.\n\n - ``initialize``: If True, creates a screen session if it does not exists.\n\n* ``screen.id`` (property) the id of the screen as a string.\n* ``screen.status`` (property) the status of the screen as a string.\n* ``screen.exists`` (property) True if the screen exists (has been initialized)\n\n - NOTE: ``.id``, ``.status``, ``.exists`` are all based off of the output of ``screen -ls``\n\n* ``screen.initialize`` Initialize a screen if does not exists yet. Equivalent to running ``screen -UR screen_name``\n* ``screen.enable_logs()`` turns Screen's logging on. The Logfile's name is automatically set to that of the ``Screen`` object.\n* ``screen.logs`` A generator that acts like ``tailF`` on the logfile.\n* ``screen.disable_logs()`` turns logging off.\n* ``screen.kill()`` Quit the screen. Equivalent to running ``screen -x screen_name -X quit``\n* ``screen.detach()`` Detach from the screen.\n* ``screen.send_commands(*commands)`` send bash commands to the screen.\n\n - ``*commands`` the command(s) to run (as a string).\n\n* ``screen.add_user_access(unix_user_name)`` Allow another user to access the screen.\n\n - ``unix_user_name`` (required): the unix name of the user to add.\n\n - \\*NOTE: to allow this feature, you will **need** to change some unix rights:\n\n + ``sudo chmod +s /usr/bin/screen``\n\n + ``sudo chmod 755 /var/run/screen``\n\n**Functions** :\n\n* ``list_screens()`` list screens. Returns a list of ``Screen`` instances.\n\n**Exceptions** :\n\n* ``ScreenNotFoundError``: Raised when a screen wasn't found.\n\nKnown issues\n-------------\n\nThis may not work properly with bpython.\n\nRoadmap\n--------\n\n* multi windows screen support", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/Christophe31/screenutils", "keywords": "", "license": "GNU Public License >=2 (ask me if you want other)", "maintainer": "", "maintainer_email": "", "name": "screenutils", "package_url": "https://pypi.org/project/screenutils/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/screenutils/", "project_urls": { "Homepage": "http://github.com/Christophe31/screenutils" }, "release_url": "https://pypi.org/project/screenutils/0.0.1.6.2/", "requires_dist": null, "requires_python": "", "summary": "lib for gnu-screen: creates/close/list/log sessions, injects commands...", "version": "0.0.1.6.2" }, "last_serial": 2650543, "releases": { "0.0.1.5.3": [ { "comment_text": "", "digests": { "md5": "b8fcd0a310e60cfbfc68ebb1e58441b1", "sha256": "3448a9fa292ecb3b637a1f40aad446f7ce2176f532c8dea7ec320dff2e70aec3" }, "downloads": -1, "filename": "screenutils-0.0.1.5.3.tar.gz", "has_sig": false, "md5_digest": "b8fcd0a310e60cfbfc68ebb1e58441b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3632, "upload_time": "2010-07-19T17:41:48", "url": "https://files.pythonhosted.org/packages/e6/b8/45a53cb16c6cbcc9e7ea6423aed496beaf8d099ca56af228b86e5abb5b66/screenutils-0.0.1.5.3.tar.gz" } ], "0.0.1.5.4": [ { "comment_text": "", "digests": { "md5": "34d2d9ebe489512ff31a64a836f95e24", "sha256": "13406ef32f83db2aed8e5b20be4346b7d170b659526bbc3bbe710b4759e3a378" }, "downloads": -1, "filename": "screenutils-0.0.1.5.4.tar.gz", "has_sig": false, "md5_digest": "34d2d9ebe489512ff31a64a836f95e24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3865, "upload_time": "2010-09-18T18:14:32", "url": "https://files.pythonhosted.org/packages/1a/d9/b9cdc5f6cdedbcf1e053992b6f8f3ae2eff74992acfb410c53074611edda/screenutils-0.0.1.5.4.tar.gz" } ], "0.0.1.5.5": [ { "comment_text": "", "digests": { "md5": "5d68335c221f249f5d8a07eefc4cdb0c", "sha256": "a341700ea95cbce7b5690dd5432bfdbfeee087fda511521a08082e0f45a75e91" }, "downloads": -1, "filename": "screenutils-0.0.1.5.5.tar.gz", "has_sig": false, "md5_digest": "5d68335c221f249f5d8a07eefc4cdb0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3903, "upload_time": "2016-05-20T07:11:46", "url": "https://files.pythonhosted.org/packages/11/03/dd43d05ad065b1711150550e7b0dbac07626e88d155233052baf302c3a92/screenutils-0.0.1.5.5.tar.gz" } ], "0.0.1.6.0": [ { "comment_text": "", "digests": { "md5": "a55d90d80ec2a6047eb90691ca39d93e", "sha256": "5f9a68337eb45942d41f5467609584d693b186588966f43bfd0721fe058f565b" }, "downloads": -1, "filename": "screenutils-0.0.1.6.0.tar.gz", "has_sig": false, "md5_digest": "a55d90d80ec2a6047eb90691ca39d93e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4664, "upload_time": "2016-06-29T10:52:47", "url": "https://files.pythonhosted.org/packages/ed/55/c049055e2e61286d19cd151f4b6915de237a0603e57f64f4e5bf067e03eb/screenutils-0.0.1.6.0.tar.gz" } ], "0.0.1.6.1": [ { "comment_text": "", "digests": { "md5": "632d8bd8eb9ecc03d2d0b0a2321fac1c", "sha256": "e85346660add4e3642ddb11c744d7ec52e8a07362d757de87c163914d7031eec" }, "downloads": -1, "filename": "screenutils-0.0.1.6.1.tar.gz", "has_sig": false, "md5_digest": "632d8bd8eb9ecc03d2d0b0a2321fac1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4648, "upload_time": "2016-06-30T08:38:14", "url": "https://files.pythonhosted.org/packages/85/11/23b75ea0998711f66117b21ede55b85ca24ed284b83316c49e4387852a8c/screenutils-0.0.1.6.1.tar.gz" } ], "0.0.1.6.2": [ { "comment_text": "", "digests": { "md5": "2be6e690b1f278c017a531fe3b660c7a", "sha256": "c80fafa7ed23f5b5c22763ca034eae51b139d8ce3e951c92428394df8c2a5514" }, "downloads": -1, "filename": "screenutils-0.0.1.6.2.tar.gz", "has_sig": false, "md5_digest": "2be6e690b1f278c017a531fe3b660c7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4827, "upload_time": "2017-02-17T22:10:57", "url": "https://files.pythonhosted.org/packages/0a/1d/328a431808c362af55648ee1a04436e2b280764808a916ab610c9b0d5f1f/screenutils-0.0.1.6.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2be6e690b1f278c017a531fe3b660c7a", "sha256": "c80fafa7ed23f5b5c22763ca034eae51b139d8ce3e951c92428394df8c2a5514" }, "downloads": -1, "filename": "screenutils-0.0.1.6.2.tar.gz", "has_sig": false, "md5_digest": "2be6e690b1f278c017a531fe3b660c7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4827, "upload_time": "2017-02-17T22:10:57", "url": "https://files.pythonhosted.org/packages/0a/1d/328a431808c362af55648ee1a04436e2b280764808a916ab610c9b0d5f1f/screenutils-0.0.1.6.2.tar.gz" } ] }