Skip to content

Commit

Permalink
Merge commit 'e2cfefbb9c0af032e3dfd78b8a1600e6fa015462' into py3
Browse files Browse the repository at this point in the history
  • Loading branch information
knipknap committed Mar 12, 2017
2 parents 53a4865 + e2cfefb commit 36d40e2
Show file tree
Hide file tree
Showing 238 changed files with 130 additions and 7,747 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion MANIFEST.in
@@ -1,2 +1 @@
include src/Exscriptd/config/*.in
include README.md
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -11,7 +11,7 @@ DISTDIR=/pub/code/releases/$(NAME)
.PHONY : clean
clean:
find . -name "*.pyc" -o -name "*.pyo" | xargs -n1 rm -f
rm -Rf build src/*.egg-info
rm -Rf build *.egg-info
cd doc; make clean

.PHONY : dist-clean
Expand Down
62 changes: 48 additions & 14 deletions README.md
@@ -1,12 +1,14 @@
Exscript
========
# Exscript

## Summary

Exscript is a Python module and a template processor for automating network
connections over protocols such as Telnet or SSH. We attempt to create the
best possible set of tools for working with Telnet and SSH.

Exscript is also an excellent and much more powerful Net::Telnet replacement,
so we welcome all you Perl developers!
Exscript also provides a set of tools and functions for sysadmins, that
simplify **regular expression matching**, **reporting** by email, **logging**,
or **syslog** handling, **CSV parsing**, **ip address handling**, and many more.

Exscript may be used to automate sessions with routers from Cisco, Juniper,
OneAccess, Huawei, or any others. If you want to configures machines
Expand All @@ -18,22 +20,54 @@ The Exscript template language is also in some ways comparable to Expect,
but has some unique features that make it a lot easier to use and understand
for non-developers.

## Method 1: Using Exscript with Python

Links
=====
```python
from Exscript.util.start import start
from Exscript.util.file import get_hosts_from_file
from Exscript.util.file import get_accounts_from_file

Mailing List: http://groups.google.com/group/exscript/
def do_something(job, host, conn):
conn.execute('uname -a')

accounts = get_accounts_from_file('accounts.cfg')
hosts = get_hosts_from_file('myhosts.txt')
start(accounts, hosts, do_something, max_threads=2)
```

Dependencies
============
Check out the Python tutorial:

* Python >=2.6 , <=2.7 (no Python 3 yet)
* Python-crypto
* Paramiko
https://github.com/knipknap/exscript/wiki/Python-API-Tutorial

## Method 2: Using the Exscript command line tool

Create a file named `test.exscript` with the following content:

```
uname -a
```

To run this Exscript template, just start Exscript using the following command:

```
exscript test.exscript ssh://localhost
```

Awesome fact: Just replace `ssh://` by `telnet://` and it should still work with Telnet devices.

Installation
============

## Documentation

Full documentation is here:

https://github.com/knipknap/exscript/wiki

## Installation

Simply follow the [installation guide](https://github.com/knipknap/exscript/wiki/Installation-Guide "Installation Guide").

## Dependencies

* Python >=2.6 , <=2.7 (we are working on Python 3 support)
* Python-crypto
* Paramiko
8 changes: 0 additions & 8 deletions TODO
@@ -1,13 +1,5 @@
Exscript
--------
* Add tests for Transport class debug levels.
* Add API docs for Exscript.parselib.
* Test the exscript executable.
* Test Queue constructor kwargs.
* Create more stdlib tests like tests/templates/stdlib.crypt/.

exscriptd
---------
* Make daemons asynchronous.
* Debug memory usage.
* Add more tests.
26 changes: 24 additions & 2 deletions doc/Makefile
Expand Up @@ -21,7 +21,7 @@ pdf:
# Copy the stdlib Python directory and modify it such that the
# generated documentation does not leak implementation details.
rm -Rf latex stdlib
cp -r ../src/Exscript/stdlib .
cp -r ../Exscript/stdlib .
mv stdlib/mysys.py stdlib/sys.py
sed -i 's/\(def [^(]*(\)scope,? ?/\1/' stdlib/*.py # Remove the scope arg
sed -i 's/\(def [^(]*\)_(/\1(/' stdlib/*.py # Remove trailing _
Expand Down Expand Up @@ -61,7 +61,29 @@ handbook: pdf

apidocs:
cd ..; ./version.sh
python mkapidoc.py
epydoc --name Exscript \
--exclude ^Exscript\.AccountManager$ \
--exclude ^Exscript\.Log$ \
--exclude ^Exscript\.Logfile$ \
--exclude ^Exscript\.LoggerProxy$ \
--exclude ^Exscript\.external$ \
--exclude ^Exscript\.interpreter$ \
--exclude ^Exscript\.parselib$ \
--exclude ^Exscript\.protocols\.OsGuesser$ \
--exclude ^Exscript\.protocols\.telnetlib$ \
--exclude ^Exscript\.stdlib$ \
--exclude ^Exscript\.workqueue$ \
--exclude ^Exscript\.version$ \
--exclude-introspect ^Exscript\.util\.sigintcatcher$ \
--html \
--no-private \
--introspect-only \
--no-source \
--no-frames \
--inheritance=included \
-v \
-o doc/api \
Exscript
cd ..; ./version.sh --reset

clean:
Expand Down
Binary file removed doc/exscript-architecture.pdf
Binary file not shown.

0 comments on commit 36d40e2

Please sign in to comment.