Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion source/standalone_examples/api/omni.kit.app/app_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Demonstrate AppFramework usage for running asynchronous Kit applications."""
"""Demonstrate AppFramework usage for running asynchronous Kit applications.

Kit intercepts ``sys.stdout``/``sys.stderr`` and ``sys.exit`` by default. This is useful for
normal Kit applications, but it can interfere with notebook output capture and Python tooling.
Set ``/app/python/interceptSysStdOutput`` and ``/app/python/interceptSysExit`` to ``false``
when the host Python environment should retain ownership of those objects.
"""

import asyncio
import os
Expand All @@ -27,6 +33,10 @@
"--no-window",
"--/app/asyncRendering=False",
"--/app/fastShutdown=True",
# Uncomment these when embedding Kit in an environment that must preserve
# Python's original stdout/stderr streams and sys.exit behavior, such as Jupyter.
# "--/app/python/interceptSysStdOutput=false",
# "--/app/python/interceptSysExit=false",
"--enable",
"omni.usd",
"--enable",
Expand Down