I have a similar problem. Performing color in an IPython terminal requires a call to the Windows DLL, but the color in qtconsole seems to support Linux-based escape sequences ... anyway. here is what i found. Its ugly ... but at least it will tell you the terminal against qtconsole ... Oh, and I have not tried with a laptop:
import __main__
if hasattr(__main__,"get_ipython"):
import IPython.kernel.zmq.zmqshell as z
if isinstance(get_ipython(), z.ZMQInteractiveShell):
print 'yep...its qtconsole'
source
share