def is_ipython(): 
try:<EOL><INDENT>__IPYTHON__<EOL>return True<EOL><DEDENT>except NameError:<EOL><INDENT>return False<EOL><DEDENT>
Returns True if acorn is imported from an ipython notebook or terminal.