Skip to content
Merged
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
32 changes: 22 additions & 10 deletions src/pyhpp_plot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
from .graph_viewer import (
MenuActionProxy,
show_graph,
show_graph_blocking,
show_interactive_graph,
)
from .graph_viewer_thread import GraphViewerThread
from .interactive_viewer import InteractiveGraphViewer
from .websocket_bridge import GraphWebSocketBridge
Expand All @@ -12,8 +6,26 @@
"GraphViewerThread",
"GraphWebSocketBridge",
"InteractiveGraphViewer",
"MenuActionProxy",
"show_graph",
"show_graph_blocking",
"show_interactive_graph",
]

try:
# `graph_viewer` is a Boost.Python extension module built only when
# hpp-plot is compiled with -DUSE_QT=ON (see CMakeLists.txt). It is not
# required by the recommended pyhpp_plot workflow (GraphViewerThread /
# InteractiveGraphViewer / GraphWebSocketBridge), so its absence must not
# prevent `import pyhpp_plot` from succeeding when built with USE_QT=OFF.
from .graph_viewer import (
MenuActionProxy,
show_graph,
show_graph_blocking,
show_interactive_graph,
)

__all__ += [
"MenuActionProxy",
"show_graph",
"show_graph_blocking",
"show_interactive_graph",
]
except ImportError:
pass