How to build a python app from Connect Sample

Is it possible to do similar things like Creating an Omniverse USD app from the Connect Sample in python?

This is a great idea. I have created an internal task [OM-101034] to track your suggestion.

On Windows, a good start would be to look at the run_py_hello_world.bat script. It is setting up the PATH and PYTHONPATH environment variables (though this is possibly no longer effective). Now that we’re using Python 3.10 it’s important to use os.add_dll_directory() since Python no longer loads DLLs from PATH or CWD. At the top of source/pyHelloWorld/ there is this code block:

if hasattr(os, "add_dll_directory"):
    scriptdir = os.path.dirname(os.path.realpath(__file__))
    dlldir = os.path.abspath(os.path.join(scriptdir, "../../_build/windows-x86_64/release"))

If you were making your own Connector you’d need to copy all of the dependencies into a particular place (see the copy directive in prebuild.toml), then you’d need to add that place to your Python DLL directories list.