Skip to content

Instantly share code, notes, and snippets.

@arpitbbhayani
Created February 21, 2020 04:14
Show Gist options
  • Save arpitbbhayani/f070269cf5e349948cc7411e76de6161 to your computer and use it in GitHub Desktop.
Save arpitbbhayani/f070269cf5e349948cc7411e76de6161 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
import sys
class IPythonPromptPS1(object):
def __init__(self):
self.line = 0
def __str__(self):
self.line += 1
return "\033[92mIn [%d]:\033[0m " % (self.line)
sys.ps1 = IPythonPromptPS1()
sys.ps2 = " \033[91m...\033[0m "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment