Coverage for src/ensae_projects/__main__.py: 75%

12 statements  

« prev     ^ index     » next       coverage.py v7.1.0, created at 2023-07-20 04:37 +0200

1# -*- coding: utf-8 -*- 

2""" 

3@file 

4@brief Implements command line ``python -m mathenjeu <command> <args>``. 

5""" 

6import sys 

7from pyquickhelper.cli import cli_main_helper 

8 

9 

10def main(args, fLOG=print): 

11 """ 

12 Implements ``python -m ensae_projects <command> <args>``. 

13 

14 @param args command line arguments 

15 @param fLOG logging function 

16 """ 

17 try: 

18 from .cli import dcm2png 

19 except ImportError: 

20 from ensae_projects.cli import convert_dcm2png # pylint: disable=W0611 

21 

22 fcts = dict(dcm2png=dcm2png) 

23 cli_main_helper(fcts, args=args, fLOG=fLOG) 

24 

25 

26if __name__ == "__main__": 

27 main(sys.argv[1:])