-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pythonrc
More file actions
29 lines (24 loc) · 742 Bytes
/
.pythonrc
File metadata and controls
29 lines (24 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import sys
import datetime
import colorama
import os
import numpy as np
import scipy as sp
import sympy as syp
from matplotlib import pyplot as plt
colorama.init(autoreset=True)
class Prompt:
def __str__(self):
print(self.prompt, end='')
return ''
class PS1(Prompt):
@property
def prompt(self):
return '{brace_c}[{time_c}{time}{brace_c}]{prompt_c}>>> '.format(
brace_c = colorama.Fore.GREEN + colorama.Style.BRIGHT,
# style is preserved, so the following are also bright:
prompt_c = colorama.Fore.LIGHTYELLOW_EX,
time_c = colorama.Fore.GREEN,
time = datetime.datetime.now().strftime('%l:%M:%S%p, %A %d/%m/%y'),
)
#sys.ps1 = PS1()