From e1b00c2aac1923c715805c9c6d755b61113b2051 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Tue, 23 Mar 2021 21:49:38 +0100 Subject: [PATCH] Clarify comments --- cprint.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cprint.py b/cprint.py index fa99d72..2d897d8 100644 --- a/cprint.py +++ b/cprint.py @@ -1,7 +1,10 @@ # Felix Albrigtsen 2021 +#Usage: cprint("%MARKERS[, ..]% text"). +#Example: cprint("%b,U% This is blue and underlined") -#Consider putting the \u001b[ outside, only store changing parts +#Consider hardcoding \u001b[ in getSequence(), only store the variable part in a dict +#Currently keeping it this way to avoid hardcoding, simplify adapting to other terminals. escSeq = { # Modifiers: "B": "\u001b[1m", #Bold @@ -77,4 +80,4 @@ def cprint(inStr): # cprint("%bc,r%This is pretty high visibility %y%with different colors") # cprint("%bw,b%This text is blue on white, %B,U,I% this is bold, underlined and white on blue") # cprint("%warning%This is a warning!") -# cprint("%error%And this is an error") \ No newline at end of file +# cprint("%error%And this is an error")