I have a module, called T, has a couple of functions and the main part, where calls these functions. From another module, I want to use this module. The main scheme is like:
"""Module T"""
def parse_args():
parser = argparse.ArgumentParser(description='Desc')
parser.add_argument('something')
def foo():
pass
if __name__ == "__main__":
args = parse_args()
foo()
And the other module I want to use:
"""Module M"""
def foo():
pass
def do_something():
"""Where I want to use module T's main"""
I have used module T from terminal with arguments and worked fine. The question may be easy but, how can I use it's main with parameters?