When I import 'Lens' from 'gi.repository' in Python, it shows that the Lens doesn't exist, as well as 'Scope'. But 'SimpleScope' exist. Is there any structural changing between Ubuntu 14.04 and Ubuntu 12.04? Thx
Yes lens available in 14.04.
You can install it by :
There were changes to the scopes API between 12.04 and 14.04. In particular, the distinction between "lenses" and "scopes" was removed: now there are only scopes, with some scopes aggregating results from other scopes. These changes carried over to the API too.
Unfortunately, things have changed again for Unity 8 (which primarily means the phone/tablet UI for now). The documentation for this new API can be found at:
Unfortunately there is no Python binding for this API yet.