Skip to content

Instantly share code, notes, and snippets.

View rsalmei's full-sized avatar

Rogério Almeida rsalmei

View GitHub Profile
@rsalmei
rsalmei / ipython_smart_prompt.py
Last active January 27, 2023 19:07
Smart prompts for iPython / Loggi
# encoding: utf-8
from __future__ import absolute_import, print_function, unicode_literals
import os
from collections import defaultdict
from IPython import get_ipython
from IPython.terminal.prompts import Prompts
from django.conf import settings
from pygments.token import Token