[pyar] ayrton - a shell like language with the power of python.

Andres Riancho andres.riancho en gmail.com
Dom Sep 8 10:26:27 ART 2013


2013/9/8 Marcos Dione <mdione en grulic.org.ar>:
>
>     Buenas, gente. Desde hace un par de años vengo soñando con
> un shell scripting language que tenga mucho mejor manejo de datos que los
> actuales (hint: sólo soportan enteros y el manoseo de strings se hace mas
> bien basado en sed, awk, grep, cut y similares) y, principalmente, que
> tenga un lindo soporte de ejecución de bloques de código remotamente a
> través de ssh.
>
>     Bueno, en resumen, no existe.

No se si existe 100% de lo que necesitas, pero Fabric esta realmente
muy cerca, ver los links debajo

> En consecuencia, me senté a jugar con
> la idea. Así nació ayrton, a partir de hoy en su versión 0.1. Básicamente
> toma la idea de sh[1], la lleva un poquito más llá y la adapta un poco a
> shell scripting; agrega unas cuantas funciones
> como export()/unset(), bash() (aplica algunas de las expansiones de bash:
> tilde, brace y glob) y casi todos los tests de atributos de archivo de
> bash (_f(), _r(), etc);  y tiene un par de context managers piolas:
>
>     with cd (path):

http://fabric.readthedocs.org/en/1.3.3/api/core/context_managers.html#fabric.context_managers.cd

>         # this runs inside path
>     # this runs in the original path
>
>     a= 42
>     with ssh (...):
>         # this runs in the remote machine
>         # but can still access variables in the local
>         print (a)

http://fabric.readthedocs.org/en/1.0.1/api/core/operations.html#fabric.operations.run
http://fabric.readthedocs.org/en/1.0.1/api/core/operations.html#fabric.operations.sudo
http://fabric.readthedocs.org/en/1.0.1/api/core/operations.html#fabric.operations.local

>     El bicho está algo verde, pero tiene doc y algunos ejemplitos... err,
> "tests cases" (por cierto, tiene tests!). Por ahora mi ejemplo mas avanzado
> está acá[5].
>
>     El source está en github[2], el release 0.1 en pypi[3] y la doc porái[4].
>
> --
> [1] http://amoffat.github.io/sh/
>
> [2] https://github.com/StyXman/ayrton
>
> [3] https://pypi.python.org/pypi/ayrton/0.1
>
> [4] http://www.grulic.org.ar/~mdione/projects/ayrton/
>
> [5] https://github.com/StyXman/elevation/blob/master/data/osm/pull_height.ay
> --
> (Not so) Random fortune:
> Tact, n.:
>         The unsaid part of what you're thinking.
> _______________________________________________
> pyar mailing list pyar en python.org.ar
> http://listas.python.org.ar/listinfo/pyar
>
> PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>
> La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre de Argentina - http://www.usla.org.ar



-- 
Andrés Riancho
Project Leader at w3af - http://w3af.org/
Web Application Attack and Audit Framework
Twitter: @w3af
GPG: 0x93C344F3


More information about the pyar mailing list