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?
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 therun
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