CenterForTheBuiltEnvironment / pythermalcomfort
1
"""
2
Module that contains the command line app.
3

4
Why does this file exist, and why not put this in __main__?
5

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

9
  - When you run `python -mpythermalcomfort` python will execute
10
    ``__main__.py`` as a script. That means there won't be any
11
    ``pythermalcomfort.__main__`` in ``sys.modules``.
12
  - When you import __main__ it will get executed again (as a module) because
13
    there's no ``pythermalcomfort.__main__`` in ``sys.modules``.
14

15
  Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration
16
"""
17 9
import sys
18

19

20 9
def main(argv=sys.argv):
21
    """
22
    Args:
23
        argv (list): List of arguments
24

25
    Returns:
26
        int: A return code
27

28
    Does stuff.
29
    """
30 9
    print(argv)
31 9
    return 0

Read our documentation on viewing source code .

Loading