./wip/py-whelk, Pretending python is a shell

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.7.1, Package name: py312-whelk-2.7.1, Maintainer: pkgsrc-users

We all like python for scripting, because it's so much more powerful
than a shell. But sometimes we really need to call a shell command
because it's so much easier than writing yet another library in
python or adding a dependency:

from whelk import shell
shell.zgrep("-r", "downloads", "/var/log/httpd")
# Here goes code to process the log

You can even pipe commands together:

from whelk import pipe
pipe(pipe.getent("group") | pipe.grep(":1...:"))


Required to run:
[lang/python37]

Required to build:
[pkgtools/cwrappers]

Master sites:

RMD160: 81671f8c06f7efdd30c3c95cb95ee8449c8bec5a
Filesize: 67.721 KB

Version history: (Expand)