3 ms·
Take a look at marcel: https://marceltheshell.org https://marceltheshell.org. It is also a shell that pipes objects, and is based on Python, but it sounds like
by geophile 6y ago
Take a look at marcel: https://marceltheshell.org https://marceltheshell.org. It is also a shell that pipes objects, and is based on Python, but it sounds like scripting will be more to your taste. There is a marcel.api module that allows you to do shell-like commands neatly integrated into python code, e.g.
from marcel.api import *
for file, size in (ls('marcel', 'test',
file=True, recursive=True) |
map(lambda f: (f.path, f.size))):
print(f'{file}: {size}')