コード例 #1
0
>>> 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)

"""

コード例 #2
0
def printc(text, color=ConsoleColor.Yellow):
    Console.ForegroundColor = color
    Console.Write(text)
    Console.ResetColor()