>>> import clr ..> clr.AddReference("System.Windows.Forms") ..> from System.Windows.Forms import MessageBox ..> MessageBox.Show("Hello World") ..> END import clr clr.AddReference("System") from System import Console, ConsoleColor Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Red."); Console.WriteLine("Another line."); # <-- This line is still white on blue. Console.ResetColor(); """ try: sys.platform="win32" os.environ['TERM'] = 'dumb' from prompt_toolkit import prompt except Exception as e: traceback.print_exc(file=sys.stdout) """
def printc(text, color=ConsoleColor.Yellow): Console.ForegroundColor = color Console.Write(text) Console.ResetColor()