Skip to content

laser.core.cli

laser.core.cli

Module that contains the command line app.

Why does this file exist, and why not put this in main?

You might be tempted to import things from main later, but that will cause problems: the code will get executed twice:

  • When you run python -midmlaser python will execute __main__.py as a script. That means there will not be any idmlaser.__main__ in sys.modules.
  • When you import main it will get executed again (as a module) because there"s no idmlaser.__main__ in sys.modules.

Also see (1) from https://click.palletsprojects.com/en/stable/setuptools/