This is probably the kind of thing you are looking for:
def run_from_ipython():
try:
__IPYTHON__
return True
except NameError:
return False
This is probably the kind of thing you are looking for:
def run_from_ipython():
try:
__IPYTHON__
return True
except NameError:
return False