These are chat archives for ipython/ipython

21st
Mar 2019
Gabriel
@gpotter2
Mar 21 00:00

Hi, any cleaner way of doing this ?

color = 'nocolor'
try:
    shell = get_ipython()
    # This function actually contains tons of hacks
    # to handle exception colors...
    color_magic = shell.magics_manager.magics["line"]["colors"]
    color_magic(color)
except NameError:
    pass

Thanks !

(Also, how stable would this call be ?) I’d like to ship it in Scapy
drethegreat1
@drethegreat1
Mar 21 14:20
Hi
Anybody here good at python scripting .. regex etc ??
Gabriel
@gpotter2
Mar 21 14:33
Please don’t flood this chat with questions totally unrelated to IPython. Ask on StackOverflow, not here... it’s a burden for the maintainers & for people that actually have relevant questions
drethegreat1
@drethegreat1
Mar 21 14:35
Cool