API§

Pass some text to a chain of programs and get the result(s) back.

https://magic_call.readthedocs.io/

class magic_call.Caller(commands=(), *, env=None, max_workers=None)[source]§

The order of commands matters!

The “best” chain is not the one with the fewest stages, but the one that needs to go least far in the list of commands.

Explicit tool chain can be specified: ps.pdf.png, dvi.png

TODO: How to decide between pdf.svg and dvi.svg?

See also

example notebook

call(source, formats=None, files=None, *, blocking=True)[source]§
get_default_chains()[source]§

Populate dictionary of default tool chains by suffix.

This works through the current list of commands to calculate the “best” tool chain for each possible suffix.

An abstraction around concurrent.futures.ThreadPoolExecutor.

class magic_call._scheduler.Task[source]§
class magic_call._scheduler.Scheduler(max_workers=None)[source]§
create_task(function, *args, **attrs)[source]§

*args are passed to function (“task” is passed as first argument)

**attrs are assigned as attributes to “task”