The example chapter of the Python/PyTango/IPython manual contains a complete example of how to operate 4 motors as a slit.