Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

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

2""" 

3@file 

4@brief Command line. 

5""" 

6import sys 

7from pyquickhelper.cli import cli_main_helper 

8 

9 

10def main(args, fLOG=print): 

11 """ 

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

13 

14 @param args command line arguments 

15 @param fLOG logging function 

16 """ 

17 try: 

18 from .cli.make_ml_app import start_mlrestapi 

19 from .cli.make_encrypt_pwd import encrypt_pwd 

20 from .cli.make_ml_store import start_mlreststor 

21 from .cli.make_ml_upload import upload_model 

22 except ImportError: 

23 from lightmlrestapi.cli.make_ml_app import start_mlrestapi 

24 from lightmlrestapi.cli.make_encrypt_pwd import encrypt_pwd 

25 from lightmlrestapi.cli.make_ml_store import start_mlreststor 

26 from lightmlrestapi.cli.make_ml_upload import upload_model 

27 

28 fcts = dict(start_mlrestapi=start_mlrestapi, encrypt_pwd=encrypt_pwd, 

29 start_mlreststor=start_mlreststor, upload_model=upload_model) 

30 return cli_main_helper(fcts, args=args, fLOG=fLOG) 

31 

32 

33if __name__ == "__main__": 

34 main(sys.argv[1:])