On Friday, January 30, 2015 03:47:38 PM Dimstar / Dominique
On Fri, 2015-01-30 at 15:35 +0100, Alberto Planas
> Hello openSUSE
> I would like to include python-sh into Factory. python-sh is a Python
> library that allows you to interact with the shell script. You can call
> external application from Python, in a coherent way.
I from my part don't see why we should block this
in anyway... I'd not
starting 'wrapping my shell scripts in python though' :)
sh.ls('-l', '-a') reads a bit nicer than call('ls', '-l',
essentially does the same.
There is more gain than that:
for line in sh.tail('-f', my_log_file):
if re.match(r'....', line):
# Do whatever ...
Also, with a bit of code you can do `ssh.ls()`
Cheers, and keep the good stuff coming!
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Jennifer Guild,
Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany
To unsubscribe, e-mail: opensuse-factory+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-factory+owner(a)opensuse.org