3 ms·
However, instead of passing strings from one command to the next, marcel passes Python values: builtin types such as lists, tuples, strings, and numbers; but al
by rahimnathwani 3y ago
However, instead of passing strings from one command to the next, marcel passes Python values: builtin types such as lists, tuples, strings, and numbers; but also objects representing files and processes.
The bit before the semicolon sounds like what you'd do in a functional language like Elixir.
It would be cool to be able to do this in regular Python programs. I know some libraries (like pandas) fake it by having a method return an object of the same class, allowing method chaining, but that doesn't work universally.
- geophile 3y agoThat works. There is a Marcel API for Python that allows shell-like usage within Python programs. See this for an example: https://www.marceltheshell.org/scripting-1 https://www.marceltheshell.org/scripting-1