Importing and Exporting Components
The value of deephaven.ui components lies in their reusability: you can create components that are composed of other components. But as you nest more and more components, it often makes sense to start splitting them into different files. This lets you keep your files easy to scan and reuse components in more places.
Exporting and Importing in Deephaven Core
In Deephaven Core, Python scripts cannot import from other Python scripts by default. In order to import from another script, you must place the script in the data directory and tell the Python interpreter where the data directory is located. For details on how to do this, see How do I import one Python script into another in the Deephaven IDE?
Example Export in Deephaven Core
Example Import in Deephaven Core
Exporting and Importing in Deephaven Enterprise
In Deephaven Enterprise, notebook files are stored in a secure file system which prevents importing by default. In order to import from another script, you can use the deephaven_enterprise.notebook module to do either an exec_notebook or a meta_import. For details on how to do this, see Modularizing Queries.