Reference Manual: (offline | online) Quickstart: (offline | online)

# renpy.invoke_in_new_context

Function: renpy.invoke_in_new_context( | callable, *args, **kwargs)

This pushes the current context, and invokes the given python function in a new context. When that function returns or raises an exception, it removes the new context, and restores the current context.

Additional arguments and keyword arguments are passed to the callable.

Please note that the context so created cannot execute renpy code. So exceptions that change the flow of renpy code (like the one created by renpy.jump ) cause this context to terminate, and are handled by the next higher context.

If you want to execute renpy code from the function, you can call it with renpy.call_in_new_context .

Use this to begin a second interaction with the user while inside an interaction.

## Example

    TODO

Reference Manual: (offline | online) Quickstart: (offline | online)