{ "info": { "author": "Jonas Melian", "author_email": "jonas@mailup.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: ISC License (ISCL)", "Natural Language :: English", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.6", "Topic :: System :: Systems Administration", "Topic :: System :: System Shells" ], "description": "The beginning\n=============\nThe shell scripting gets to be non-maintainable code; its sintaxis is very\ncryptic and it's very hard to debug. Aside all these negative point increase\nat the same time as the size of the program grows.\n\nHere is where Python comes.\n\nWhatever administrator without great knowledge about programming can built basic\nscripts fastly after of read the `tutorial`_. Its sintaxis is as pseudo-code so\nit's very easy to code. The `basic errors`_ --as syntax errors and exceptions--\nhelp to debug together to the error logging system implemented in `logging`_\nmodule. In addition Python comes with an extensive `standard library`_ of useful\nmodules which will help to speed up the development of scripts, and if you need\nsome another module could be searched in the `PyPi`_ repository.\n\nI had forked the *Fabric* project to add the files editing and something other\nthing but my goal is very different to that project, aside of that my changes\nwere not added until that I deleted my forked repository (after many months).\n\n\n.. _tutorial: http://docs.python.org/tutorial/\n.. _basic errors: http://docs.python.org/tutorial/errors.html\n.. _logging: http://docs.python.org/library/logging.html\n.. _standard library: http://docs.python.org/library/index.html\n.. _PyPi: http://pypi.python.org/\n\nScripy\n======\nThe main tool of this package is the `shell.Run()` class which lets to run\nsystem commands in the same shell. It works well with pipes and pass the shell\nvariables. It doesn't makes pattern expansion (* ?) as in the shell but could be\nused `shell.expand()` instead.\n\nCommands path\n-------------\nThe absolute path of the commands used by *Scripy* are in the *_path* module so\nit's avoid some possible trojan. The path is right for Debian/Ubuntu systems\nsince it's where I can check them.\n\nWithout the command expansion, there would be to use::\n\n import scripy\n from scripy import _path\n\n run = scripy.Run()\n run(\"{sudo} {ls} /dev/null\".format(sudo=_path.Bin.sudo,\n ls=_path.Bin.ls))\n\nBut with the command expansion, if any command is prepended with *!* then get\nits absolute path::\n\n run(\"!sudo !ls /dev/null\")\n\nEdit\n----\nSomething that is very important in the shell script is the files editing, and\n*Scripy* makes it very easy using the `edit.Edit()` class. It only creates\nbackups to files that are going to be modified, lets modify files owned by\nanother users (since that uses *sudo* when the class is instancied), and has\nmethods for append text, comment or comment out lines that start with a\ndetermined chracter, and a wrapper to *sed* which lets backup the file.\n\nLogging\n-------\nYamlog_ manages the error catching code and error reporting.\n\nNew scripts\n===========\nTo build scripts based on *Scripy*, it is advised that been created a module\n(`_path`) with the new commands to use (that are not in `Scripy._path`), and\nanother one (`_config`) where to instantiate `scripy.Run()`.\n\n`_path`::\n\n class Bin(object):\n new_command = '/path/to/new/command'\n\n`_config`::\n\n import scripy\n\n from . import _path\n\n run = scripy.Run(bin=_path.Bin)\n\n\n.. _Yamlog: http://pypi.python.org/pypi/Yamlog\n\nChange history\n==============\n\nv0.9.3, 2010-02-16\n------------------\n* Use the `platform` module to get information related to the system.\n* The logger has been moved to a separated project called *Yamlog*.\n* Scripts based on *Scripy* can add more command paths at instantiating\n `scripy.Run()`.\n* Fixed `edit.Edit()` to can edit files owned by another user.\n\nv0.9.2, 2010-02-04\n------------------\n* Path expansion for commands.\n* `shell.Run()` returns a named tuple with `returncode` and `stdout`.\n* *Nose* was capturing all log output so it was not being written to the log file.\n* Renamed class `shell.Code()` to `shell.ReturnCode()`. It manages now the valid\n exit status codes (mainly from commands run in the shell).\n* Better error catching code and error reporting.\n* Changed the logging handler to have rotation of disk log files.\n* *PyYAML* is optional to install.\n\nv0.9, 2010-01-28\n----------------\n* Initial release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/ares/scripy/", "keywords": "system shell command bash administration", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "Scripy", "package_url": "https://pypi.org/project/Scripy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Scripy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/ares/scripy/" }, "release_url": "https://pypi.org/project/Scripy/0.9.3/", "requires_dist": null, "requires_python": null, "summary": "Python tools for manage system commands as replacement to bash script", "version": "0.9.3" }, "last_serial": 785617, "releases": { "0.9": [ { "comment_text": "", "digests": { "md5": "6063656e11822e82d72948441f0b038f", "sha256": "29b1111550ef48029bb8916a6ead50199011a3c37d1fd654b7fdc8890bcb9caf" }, "downloads": -1, "filename": "Scripy-0.9-py2.6.egg", "has_sig": false, "md5_digest": "6063656e11822e82d72948441f0b038f", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 27197, "upload_time": "2010-01-28T14:38:00", "url": "https://files.pythonhosted.org/packages/ff/81/7fed418a938825b4380d10298a00602ffc0eeb5db9f950b639b5dd0aab7f/Scripy-0.9-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "e9f6165a6a0e6b4c3d79d772eb09c7f6", "sha256": "50bfa5e80ce861e0bbb619bb6ea5d3652f29533f2c33c47794f2999c24bdbb32" }, "downloads": -1, "filename": "Scripy-0.9.tar.gz", "has_sig": false, "md5_digest": "e9f6165a6a0e6b4c3d79d772eb09c7f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14699, "upload_time": "2010-01-28T14:37:57", "url": "https://files.pythonhosted.org/packages/d2/37/348fd7e70f319d5968a3a2fa87dd67bb63133e5a3cdd3f914c4b4728a12c/Scripy-0.9.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "f321e0d08b06ad5fcdd085456e9cb2fd", "sha256": "50070ada73df9eea4a5d1510ddb6e5d3b16455d2439a44f1b83ad5a048273d25" }, "downloads": -1, "filename": "Scripy-0.9.2-py2.6.egg", "has_sig": false, "md5_digest": "f321e0d08b06ad5fcdd085456e9cb2fd", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 29515, "upload_time": "2010-02-04T17:08:00", "url": "https://files.pythonhosted.org/packages/a8/89/6296c524e2b991888fe309d11e05adaad4fe16635421f658fe485b4e3c9d/Scripy-0.9.2-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "1fd08030564ebf23e390ad7e34a61aa9", "sha256": "6dd53fccf490f00d2d95e11d51287bff62e66df53c6208e9b4ec49721774e34f" }, "downloads": -1, "filename": "Scripy-0.9.2.tar.gz", "has_sig": false, "md5_digest": "1fd08030564ebf23e390ad7e34a61aa9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16859, "upload_time": "2010-02-04T17:07:57", "url": "https://files.pythonhosted.org/packages/39/7c/ce1322301774a936315f9cfcc657de9c5fa9d5af6526ec352b249c47cb4c/Scripy-0.9.2.tar.gz" } ], "0.9.3": [ { "comment_text": "", "digests": { "md5": "82a2016e8b96958bb009737eeac8e440", "sha256": "3bc3880da85a0b374314d389da2a1a4aa4ca11463b68cf9ee5b3cb50bf5bef5e" }, "downloads": -1, "filename": "Scripy-0.9.3-py2.6.egg", "has_sig": false, "md5_digest": "82a2016e8b96958bb009737eeac8e440", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 25891, "upload_time": "2010-02-16T20:40:39", "url": "https://files.pythonhosted.org/packages/60/63/06fa4d9395214e9ffa20bbd51b94ec91b1773673a9c7730b50e544c7f540/Scripy-0.9.3-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "d2582b21f7f01df33913651b465ed0a1", "sha256": "457cce92e1f5d426f03eef821f1efd5ef70e3156247c62c65c26cef4efe2316d" }, "downloads": -1, "filename": "Scripy-0.9.3.tar.gz", "has_sig": false, "md5_digest": "d2582b21f7f01df33913651b465ed0a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15493, "upload_time": "2010-02-16T20:40:36", "url": "https://files.pythonhosted.org/packages/b8/94/e938ead848dd951c03a6cad601dee4150cca8a7251e74c983fc2001df792/Scripy-0.9.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "82a2016e8b96958bb009737eeac8e440", "sha256": "3bc3880da85a0b374314d389da2a1a4aa4ca11463b68cf9ee5b3cb50bf5bef5e" }, "downloads": -1, "filename": "Scripy-0.9.3-py2.6.egg", "has_sig": false, "md5_digest": "82a2016e8b96958bb009737eeac8e440", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 25891, "upload_time": "2010-02-16T20:40:39", "url": "https://files.pythonhosted.org/packages/60/63/06fa4d9395214e9ffa20bbd51b94ec91b1773673a9c7730b50e544c7f540/Scripy-0.9.3-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "d2582b21f7f01df33913651b465ed0a1", "sha256": "457cce92e1f5d426f03eef821f1efd5ef70e3156247c62c65c26cef4efe2316d" }, "downloads": -1, "filename": "Scripy-0.9.3.tar.gz", "has_sig": false, "md5_digest": "d2582b21f7f01df33913651b465ed0a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15493, "upload_time": "2010-02-16T20:40:36", "url": "https://files.pythonhosted.org/packages/b8/94/e938ead848dd951c03a6cad601dee4150cca8a7251e74c983fc2001df792/Scripy-0.9.3.tar.gz" } ] }