ufo-kit/concert — pull request #227 by tomago (2014-03-03 16:19:54+00:00)
Title: Introduce locks to prevent unwanted changes

It's 2 a.m., I am super-tired and accidentally move a motor which crushes my whole lab. Now it's possible to prevent that by locking parameters and whole devices for writing.
Another use case is a "master" beam line session, where a beam line scientist can set some devices to states which are fixed. The user still wants to see those devices or also log their values and so on. But those devices shouldn't be touched. And so our beam line scientist from earlier can do `device.lock(permanent=True)` and the user then cannot remove the write protection (well in terms of keeping hand off underscored things). It is equivalent to setting the setter to something which is not implemented but this is simpler and more understandable for non-programmers.

```python
motor['position'].lock()
motor.position = 12 * q.mm
# No can do, exception raised

motor.['position'].unlock()
motor.positoin = 12 * q.mm

motor.lock(permanent=True)
# Everything is locked for eternity
```