Merge pull request
#1059 from fperez/__IPYTHON__...
Merge pull request
#1059 from fperez/__IPYTHON__
Switch to simple `__IPYTHON__` global to indicate an IPython Shell object has been created. Note that this does *not* try to track whether user code is being executed by ipython via %run, nor whether the Shell object itself is running an interactive event loop or not.
So the answer for how people should query whether IPython objects are active is now simply
```
try:
__IPYTHON__
except NameError:
print 'not in IPython'
```
We do not attempt to track activity levels anymore, as we realized that logic was ultimately to brittle and error prone to be of any real use.