prdef does not print correctly the inspected function
If no quotes, the name of the function is not printed well
DEMO [9]: prdef(prdef)
'prdef' is defined in:
DEMO [8]: prdef(cen)
'f' is defined in:
And in fact, in booth cases, it prints the decorator function:
@_multimotors
def cen(counter=None, axis=None):
counter_name = _get_selected_counter_name(counter=counter)
SCANS = setup_globals.SCANS
return SCANS[-1].cen(counter_name, axis=axis)
DEMO [3]: prdef(cen)
'f' is defined in:
/home/guilloud/PROJECTS/bliss/bliss/common/scans.py:1366
def f(counter=None, axis=None):
try:
return func(counter=counter, axis=axis)
except ValueError:
if axis is not None:
raise
motors = last_scan_motors()
if len(motors) <= 1:
raise
# check if there is some calcaxis with associated real
motors = _remove_real_dependent_of_calc(motors)
if len(motors) == 1:
return func(counter=counter, axis=motors.pop())
return {mot: func(counter=counter, axis=mot) for mot in motors}
def _goto_multimotors(func):
def f(counter=None, axis=None):
try:
return func(counter=counter, axis=axis)
except ValueError:
if axis is not None:
...
Edited by Matias Guijarro