Python automation library for systems administration tasks
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
tests
.gitignore
.travis.yml
LICENSE
MANIFEST.in
README.md
ops.py
setup.cfg
setup.py

README.md

ops Build Status

ops is a library for scripting systems administration tasks in Python.

Requirements

  • Python >= 2.6

Example

from ops import *

for path in find('/tmp').filter(name='*.py', file=True).exclude(mtime__day=13):
    result = run('python ${path}', path=path)
    print('Command: %s' % result.command)
    print('Code: %s' % result.code)
    if result:
        print('Stdout: %s' % result.stdout)
    else:
        print('Stderr: %s' % result.stderr)

Which might produce something like:

Command: python /tmp/test.py
Code: 0
Stdout: Hello World

License

This work is licensed under the MIT License (see the LICENSE file).