Mechanics ipython

This depends on PR #2683, so that one should be merge first.