def call_plotters(root_path: Path, args):
    stor_root_path = root_path
    root_path = get_plotters_root_path(root_path)
    if (not root_path.is_dir()):
        if os.path.exists(root_path):
            try:
                os.remove(root_path)
            except Exception as e:
                print(f'Exception deleting old root path: {type(e)} {e}.')
    if (not os.path.exists(root_path)):
        print(f'Creating plotters folder within STOR_ROOT: {root_path}')
        try:
            os.mkdir(root_path)
        except Exception as e:
            print(f'Cannot create plotters root path {root_path} {type(e)} {e}.')
    plotters = argparse.ArgumentParser(description='Available options.')
    subparsers = plotters.add_subparsers(help='Available options', dest='plotter')
    build_parser(subparsers, root_path, stor_plotter, 'chiapos', 'Storpos Plotter')
    build_parser(subparsers, root_path, madmax_plotter, 'madmax', 'Madmax Plotter')
    build_parser(subparsers, root_path, bladebit_plotter, 'bladebit', 'Bladebit Plotter')
    install_parser = subparsers.add_parser('install', description='Install custom plotters.')
    install_parser.add_argument('install_plotter', type=str, help='The plotters available for installing. Choose from madmax or bladebit.')
    args = plotters.parse_args(args)
    if (args.plotter == 'chiapos'):
        plot_stor(args, stor_root_path)
    if (args.plotter == 'madmax'):
        plot_madmax(args, stor_root_path, root_path)
    if (args.plotter == 'bladebit'):
        plot_bladebit(args, stor_root_path, root_path)
    if (args.plotter == 'install'):
        install_plotter(args.install_plotter, root_path)
def call_plotters(root_path: Path, args):
    stor_root_path = root_path
    root_path = get_plotters_root_path(root_path)
    if (not root_path.is_dir()):
        if os.path.exists(root_path):
            try:
                os.remove(root_path)
            except Exception as e:
                print(f'Exception deleting old root path: {type(e)} {e}.')
    if (not os.path.exists(root_path)):
        print(f'Creating plotters folder within STOR_ROOT: {root_path}')
        try:
            os.mkdir(root_path)
        except Exception as e:
            print(f'Cannot create plotters root path {root_path} {type(e)} {e}.')
    plotters = argparse.ArgumentParser(description='Available options.')
    subparsers = plotters.add_subparsers(help='Available options', dest='plotter')
    build_parser(subparsers, root_path, stor_plotter, 'chiapos', 'Storpos Plotter')
    build_parser(subparsers, root_path, madmax_plotter, 'madmax', 'Madmax Plotter')
    build_parser(subparsers, root_path, bladebit_plotter, 'bladebit', 'Bladebit Plotter')
    install_parser = subparsers.add_parser('install', description='Install custom plotters.')
    install_parser.add_argument('install_plotter', type=str, help='The plotters available for installing. Choose from madmax or bladebit.')
    args = plotters.parse_args(args)
    if (args.plotter == 'chiapos'):
        plot_stor(args, stor_root_path)
    if (args.plotter == 'madmax'):
        plot_madmax(args, stor_root_path, root_path)
    if (args.plotter == 'bladebit'):
        plot_bladebit(args, stor_root_path, root_path)
    if (args.plotter == 'install'):
        install_plotter(args.install_plotter, root_path)