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 Implements command line ``python -m mathenjeu <command> <args>``.
5"""
6import sys
7from pyquickhelper.cli import cli_main_helper
10def main(args, fLOG=print):
11 """
12 Implements ``python -m mathenjeu <command> <args>``.
14 @param args command line arguments
15 @param fLOG logging function
16 """
17 try:
18 from .cli import create_qcm_local_app, create_qcm_https_app, create_self_signed_cert
19 from .cli import create_static_local_app, create_static_https_app
20 except ImportError: # pragma: no cover
21 from mathenjeu.cli import create_qcm_local_app, create_qcm_https_app, create_self_signed_cert
22 from mathenjeu.cli import create_static_local_app, create_static_https_app
24 fcts = dict(qcm_local=create_qcm_local_app,
25 qcm_https=create_qcm_https_app,
26 static_local=create_static_local_app,
27 static_https=create_static_https_app,
28 create_self_signed_cert=create_self_signed_cert)
29 cli_main_helper(fcts, args=args, fLOG=fLOG)
32if __name__ == "__main__":
33 main(sys.argv[1:]) # pragma: no cover