libtemplate package

Submodules

libtemplate.cli module

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 -mlibtemplate python will execute __main__.py as a script. That means there won’t be any libtemplate.__main__ in sys.modules.

  • When you import __main__ it will get executed again (as a module) because there’s no libtemplate.__main__ in sys.modules.

Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration

libtemplate.cli.main(argv=['/home/docs/checkouts/readthedocs.org/user_builds/libtemplate/envs/latest/lib/python3.7/site-packages/sphinx/__main__.py', '-T', '-E', '-b', 'html', '-d', '_build/doctrees', '-D', 'language=en', '.', '_build/html'])[source]
Parameters

argv (list) – List of arguments

Returns

int – A return code

Does stuff.

libtemplate.dummy module

My dummy module

libtemplate.dummy.myfunc(arg1, arg2)[source]

My func desc

Parameters
  • arg1 (int) – first

  • arg2 (float) – second

Returns

int – The first arg

Module contents