using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace IronPythonCompiler {
public static class ConsoleOps {
public static void Error(string format, params object[] args) {
Error(false, format, args);
}
public static void Error(bool fatal, string format, params object[] args) {
ConsoleColor origForeground = Console.ForegroundColor;
ConsoleColor origBackground = Console.BackgroundColor;
Console.ForegroundColor = ConsoleColor.DarkRed;
Console.WriteLine("ERROR: " + format, args);
Console.ForegroundColor = origForeground;
Console.BackgroundColor = origBackground;
if (fatal) {
Environment.Exit(-1);
}
}
public static void Warning(string format, params object[] args) {
ConsoleColor origForeground = Console.ForegroundColor;
ConsoleColor origBackground = Console.BackgroundColor;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("WARNING: " + format, args);
Console.ForegroundColor = origForeground;
Console.BackgroundColor = origBackground;
}
public static void Info(string format, params object[] args) {
Console.WriteLine(format, args);
}
public static void Usage(bool doExit = false) {
Console.WriteLine(@"ipyc: The Command-Line IronPython Compiler
Usage: ipyc.exe [options] file [file ...]
Options:
/out:output_file Output file name (default is main_file.)
/target:dll Compile only into dll. Default
/target:exe Generate CONSOLE executable stub for startup in addition to dll.
/target:winexe Generate WINDOWS executable stub for startup in addition to dll.
/fileversion: Sets the file version attribute for the generated assembly
/copyright: Sets the copyright message for the generated assembly
/productname: Sets the product name attribute for the generated assembly
/productversion: Sets the product version attribute for the generated assembly
/py: