tomerfiliba / plumbum

Plumbum: Shell Combinators
https://plumbum.readthedocs.io
MIT License
2.81k stars 183 forks source link

How to initialize a Class/Object derived from cli.Application? #538

Open workflowsguy opened 3 years ago

workflowsguy commented 3 years ago

I need to write a group of similar CLI scripts, so I created a class derived from cli.Application that contains the common logic in the __init__ method. However, I also need to pass creation parameters to those classes individually. Normally, I would pass the parameters during object creation, but as I understand the documentation, objects are created by the run class method, not by individual construction.

So I would like to know: is there a different construction method that allows the passing of setup parameters to those classes and if so, how?

Thanks,

Guy