|
| path |
| The path to show.
|
|
| standalone |
| In the standalone mode, the basic parameters of the modules are shown.
|
|
Viewer object for the ipython_handler_basf2 path.
Do not use it on your own.
Definition at line 39 of file viewer.py.
◆ __init__()
def __init__ |
( |
|
self, |
|
|
|
path, |
|
|
|
standalone = False |
|
) |
| |
Create a new path viewer object with the path from the process
Definition at line 46 of file viewer.py.
46 def __init__(self, path, standalone=False):
47 """
48 Create a new path viewer object with the path from the process
49 """
50
51 try:
52 self.path = path.modules()
53 except BaseException:
54 self.path = path
55
56
57 self.standalone = standalone
58
◆ create()
Create the widget
Reimplemented from IPythonWidget.
Definition at line 59 of file viewer.py.
59 def create(self):
60 """
61 Create the widget
62 """
63
64 import ipywidgets as widgets
65
66 if self.path is None:
67 return widgets.HTML("No modules in path.")
68
69 a = widgets.Accordion()
70 children = []
71
72 for i, element in enumerate(self.path):
73 html = ModuleViewer(element, standalone=self.standalone)
74 children.append(html.create())
75 if isinstance(html.module.name, str):
76 a.set_title(i, html.module.name)
77 else:
78 a.set_title(i, html.module.name())
79
80 a.children = children
81
82 return a
83
84
◆ path
The path to show.
Definition at line 52 of file viewer.py.
◆ standalone
In the standalone mode, the basic parameters of the modules are shown.
Definition at line 57 of file viewer.py.
The documentation for this class was generated from the following file:
- framework/scripts/hep_ipython_tools/ipython_handler_basf2/viewer.py