File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313pyfancy ().cyan_bg ("Cyan background" ).output ()
1414pyfancy ().black ().gray_bg ("Gray background" ).output ()
1515pyfancy ().read ("pyfancy/demo/import.txt" ).output ()
16+ pyfancy ().red ("This should not be seen!" ).reset ().output ()
1617print (pyfancy ().red ("Hello" ).raw (", " ).blue ("world!" ).strip ())
Original file line number Diff line number Diff line change @@ -85,13 +85,17 @@ def output(self):
8585 # Adds new text without changing the styling
8686 def add (self ,addition ):
8787 self .out += addition ;
88- return self ;
88+ return self
8989
9090 def read (self ,file ):
9191 f = open (file , 'r' )
9292 self .out += f .read ()
9393 f .close ()
9494 return self
95+
96+ def reset (self ):
97+ self .out = ""
98+ return self
9599
96100 #Alternate between all the colours of the rainbow
97101 #No orange, replaced with lightRed
You can’t perform that action at this time.
0 commit comments