First cut of user CLI API 

Using wh_pos, for “Where Positioner”

On Dec 5, 2014, at 12:08 AM, Thomas A Caswell <notifications@github.com<mailto:notifications@github.com>> wrote:


In ophyd/userapi/cli_api.py:

> +
> +  new_offsets = [a - b for a, b in zip(position, dial)]
> +
> +  print('')
> +
> +  for o, old_o, p in zip(new_offsets, old_offsets, positioner):
> +    if caput(p._record + '.OFF', o):
> +      print('Motor {0} set to position {1} (Offset = {2} was {3})'.format(
> +             p.name, p.position, o, old_o))
> +    else:
> +      print('Unable to set position of positioner {0}'.format(p.name))
> +
> +  print('')
> +
> +@_ensure_positioner
> +def get_pos(positioner):


This reads more as 'print_pos', get_pos implies it returns something.

—
Reply to this email directly or view it on GitHub<https://github.com/NSLS-II/ophyd/pull/23/files#r21355726>.