Belle II Software light-2406-ragdoll
PathViewer Class Reference
Inheritance diagram for PathViewer:
Collaboration diagram for PathViewer:

Public Member Functions

def __init__ (self, path, standalone=False)
 
def create (self)
 

Public Attributes

 path
 The path to show.
 
 standalone
 In the standalone mode, the basic parameters of the modules are shown.
 

Detailed Description

Viewer object for the ipython_handler_basf2 path.
Do not use it on your own.

Definition at line 39 of file viewer.py.

Constructor & Destructor Documentation

◆ __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

Member Function Documentation

◆ create()

def create (   self)
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

Member Data Documentation

◆ path

path

The path to show.

Definition at line 52 of file viewer.py.

◆ standalone

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: