Populate notebook context with startup.py initialization file skeleton and greeting.

    This will set up context ``startup`` and ``greeting`` for their default values.

    :param notebook_context: Dictionary of notebook context info to be to passed to NotebookManager

    :param config_file: The current .ini file used to start up the Pyramid. This is used to pass it around to ``pyramid.paster.boostrap()`` to initialize dummy request object and such.

    :param bootstrap_py: startup.py script header which sets up environment creation

    :parma bootstrap_greeting: Markdown snippet which sets up start of greeting text

    :param cwd: Optional forced working directory. If not set use the directory of a config file.

def make_startup(notebook_context, config_file, bootstrap_py=PYRAMID_BOOSTRAP, bootstrap_greeting=PYRAMID_GREETING, cwd=""):
    """Populate notebook context with startup.py initialization file skeleton and greeting.

    This will set up context ``startup`` and ``greeting`` for their default values.

    :param notebook_context: Dictionary of notebook context info to be to passed to NotebookManager

    :param config_file: The current .ini file used to start up the Pyramid. This is used to pass it around to ``pyramid.paster.boostrap()`` to initialize dummy request object and such.

    :param bootstrap_py: startup.py script header which sets up environment creation

    :parma bootstrap_greeting: Markdown snippet which sets up start of greeting text

    :param cwd: Optional forced working directory. If not set use the directory of a config file.
    """

    # Set up some default imports and variables

    nc = notebook_context

    add_greeting(nc, "\nAvailable variables and functions:")

    # http://docs.pylonsproject.org/projects/pyramid/en/1.1-branch/narr/commandline.html#writing-a-script

    if config_file is not None:
        assert type(config_file) == str, "Got bad config_file {}".format(config_file)
        config_file = os.path.abspath(config_file)
        assert os.path.exists(config_file), "Passed in bad config file: {}".format(config_file)
        add_script(nc, bootstrap_py.format(config_uri=config_file, cwd=cwd))
        add_greeting(nc, bootstrap_greeting)

    add_script(nc, "import datetime")
    add_greeting(nc, "* **datetime** - Python [datetime module](https://docs.python.org/3.5/library/datetime.html)")

    add_script(nc, "import time")
    add_greeting(nc, "* **time** - Python [time module](https://docs.python.org/3.5/library/time.html)")

    try:
        # Commonly used with Pyramid applications
        import transaction  # noQA
        add_script(nc, "import transaction\n")
        add_greeting(nc, "* **transaction** - Zope [transaction manager](http://zodb.readthedocs.org/en/latest/transactions.html), e.g. `transaction.commit()`")
    except ImportError:
        pass