On Fri, 2015-01-30 at 15:35 +0100, Alberto Planas Dominguez wrote:
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 any
external application from Python, in a coherent way. For example
import sh
print sh.ls('-l', '-a')
print sh.pwd()
This will call `ls -l -a` and `pwd` and print the result in the console. Is
powerful and really convenient when you want to replace shell scripts
with a more productive language.
If no one is against this, I would like to create the request the next
Monday.
Sounds like a very interesting, simplified way to launch external tools.
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', '-a'), which,
essentially does the same.
Thanks,
Alberto Planas
Cheers, and keep the good stuff coming!
Dominique
--
Dimstar / Dominique Leuenberger <dimstar(a)opensuse.org>
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-factory+owner(a)opensuse.org