| | |
| | | |
| | | - ``pserve`` looks for ``[app:main]`` and finds ``use = egg:tutorial``. |
| | | |
| | | - The projects's ``setup.py`` has defined an "entry point" (lines 9-12) for the |
| | | - The projects's ``setup.py`` has defined an "entry point" (lines 10-13) for the |
| | | project's "main" entry point of ``tutorial:main``. |
| | | |
| | | - The ``tutorial`` package's ``__init__`` has a ``main`` function. |
| | |
| | | |
| | | The ``.ini`` file is also used for two other functions: |
| | | |
| | | - *Configuring the WSGI server*. ``[server:main]`` wires up the choice of which |
| | | WSGI *server* for your WSGI *application*. In this case, we are using |
| | | ``wsgiref`` bundled in the Python library. It also wires up the *port |
| | | number*: ``port = 6543`` tells ``wsgiref`` to listen on port 6543. |
| | | - *Configuring the WSGI server*. ``[server:main]`` wires up the choice |
| | | of which WSGI *server* for your WSGI *application*. In this case, we |
| | | are using ``waitress`` which was specified in |
| | | ``tutorial/setup.py``. It also wires up the *port number*: |
| | | ``listen = localhost:6543`` tells ``waitress`` to listen on host |
| | | ``localhost`` at port ``6543``. |
| | | |
| | | - *Configuring Python logging*. Pyramid uses Python standard logging, which |
| | | needs a number of configuration values. The ``.ini`` serves this function. |