@@ -262,7 +262,7 @@ def wrapper(*args, **kwargs):
262262 return wrapper
263263
264264
265- def show_ophyd_symbols (show_pv = True , printing = True , verbose = False ):
265+ def show_ophyd_symbols (show_pv = True , printing = True , verbose = False , symbols = None ):
266266 """
267267 show all the ophyd Signal and Device objects defined as globals
268268
@@ -274,14 +274,17 @@ def show_ophyd_symbols(show_pv=True, printing=True, verbose=False):
274274 If True, print table to stdout.
275275 verbose: bool (default: False)
276276 If True, also show ``str(obj``.
277+ symbols: dict (default: `globals()`)
278+ If None, use global symbol table.
279+ If not None, use provided dictionary.
277280 """
278281 table = pyRestTable .Table ()
279282 table .labels = ["name" , "ophyd structure" ]
280283 if show_pv :
281284 table .addLabel ("EPICS PV" )
282285 if verbose :
283286 table .addLabel ("object representation" )
284- g = globals ()
287+ g = symbols or globals ()
285288 for k , v in sorted (g .items ()):
286289 if isinstance (v , (ophyd .Signal , ophyd .Device )):
287290 row = [k , v .__class__ .__name__ ]
0 commit comments