void Run(string[] args) { //TestMode(); //return; Console.OutputEncoding = Encoding.ASCII; var cmd = new CmdLineHelper(); _runner = new PyRunner(cmd.ParamAfterSwitch("command"), cmd.ParamAfterSwitch("script"), cmd.ParamAfterSwitch("args"), cmd.ParamAfterSwitch("workingDirectory"), cmd); _runner.Run(); //Console.ReadKey(); }
void TestMode() { // -script "TestScript.py" -args "status" -command "hg" -workingDirectory "d:\Dev\Openbox\Change Controls\GBS Reforecasts Integration" Console.OutputEncoding = Encoding.ASCII; var cmd = new CmdLineHelper(); _runner = new PyRunner("notepad.exe", "TestScript.py", "test.txt", @"c:\temp", cmd); _runner.Run(); // Console.ReadKey(); }
public Form1() { InitializeComponent(); FormClosing += new FormClosingEventHandler(Form1_FormClosing); _configuration = new BindingList<IPConfiguration>(); _configuration.Clear(); foreach (var s in Properties.Settings.Default.ConfigurationStrings ) { var cmd = new CmdLineHelper(); cmd.ParseString(s); var config = new IPConfiguration(); config.Configure(cmd); _configuration.Add(config); } UpdateContextMenu(); }
private void GetParams(IEnumerable<string> args) { _cmd = new CmdLineHelper(); _cmd.Parse(args); _processName = _cmd.ParamAfterSwitch("ProcessName"); _scriptFile = _cmd.ParamAfterSwitch("ScriptFile"); _code = _cmd.ParamAfterSwitch("Code"); }
public PyProcessContext CreateSpawnedProcess(string command, string commandArguments, string workingDirectory, dynamic processHandler) { if (workingDirectory == null) { workingDirectory = _workingDirectory; } var cmd = new CmdLineHelper(); cmd.ParseString(commandArguments); return new PyProcessContext(_scriptContext, processHandler, this._processFactory, command, commandArguments, workingDirectory, cmd); }