Or open the relax prompt (Ctrl+p) and write
<source lang="python">
from pipe_control.mol_res_spin import spin_loop print("%20s %20s" % ("# Spin ID", "Model"))for resiob spin, spin_id in cdp.mol[0].resspin_loop(return_id=True, skip_desel=True): print resiob.name, resiob.num("%20s %20s" % (repr(spin_id), resiob.spin[0].model)
</source>