示例#1
0
 /// <remarks>
 /// After the engine is created the standard output is replaced with our custom Stream class so we
 /// can redirect the stdout to the text editor window.
 /// This can be done in this method since the Runtime object will have been created before this method
 /// is called.
 /// </remarks>
 protected override IConsole CreateConsole(ScriptEngine engine, CommandLine commandLine, ConsoleOptions options)
 {
     SetOutput(new PythonOutputStream(_textEditor));
     _pythonConsole = new PythonConsole(_textEditor, commandLine);
     ConsoleCreated?.Invoke(this, EventArgs.Empty);
     return(_pythonConsole);
 }
 /// <remarks>
 /// After the engine is created the standard output is replaced with our custom Stream class so we
 /// can redirect the stdout to the text editor window.
 /// This can be done in this method since the Runtime object will have been created before this method
 /// is called.
 /// </remarks>
 protected override IConsole CreateConsole(ScriptEngine engine, CommandLine commandLine, ConsoleOptions options)
 {
     SetOutput(new PythonOutputStream(textEditor));
     pythonConsole = new PythonConsole(textEditor, commandLine);
     ConsoleCreated?.Invoke(this, EventArgs.Empty);
     //Runtime.SetTrace(OnTracebackReceived);//yzx
     return(pythonConsole);
 }
示例#3
0
 /// <remarks>
 /// After the engine is created the standard output is replaced with our custom Stream class so we
 /// can redirect the stdout to the text editor window.
 /// This can be done in this method since the Runtime object will have been created before this method
 /// is called.
 /// </remarks>
 protected override IConsole CreateConsole(ScriptEngine engine, CommandLine commandLine, ConsoleOptions options)
 {
     SetOutput(new PythonOutputStream(textEditor));
     pythonConsole = new PythonConsole(textEditor, commandLine);
     if (ConsoleCreated != null)
     {
         ConsoleCreated(this, EventArgs.Empty);
     }
     return(pythonConsole);
 }
示例#4
0
        public void Dispose()
        {
            if (_pythonConsole != null)
            {
                _pythonConsole.Dispose();
                _pythonConsole = null;
            }

            if (_thread != null)
            {
                _thread.Join();
                _thread = null;
            }
        }
示例#5
0
 internal static void ConfigureVariables(PythonConsole console)
 {
 }
示例#6
0
 internal static void CallInitializeScript(PythonConsole console)
 {
 }
 /// <remarks>
 /// After the engine is created the standard output is replaced with our custom Stream class so we
 /// can redirect the stdout to the text editor window.
 /// This can be done in this method since the Runtime object will have been created before this method
 /// is called.
 /// </remarks>
 protected override IConsole CreateConsole(ScriptEngine engine, CommandLine commandLine, ConsoleOptions options)
 {
     SetOutput(new PythonOutputStream(textEditor));
     pythonConsole = new PythonConsole(textEditor, commandLine);
     if (ConsoleCreated != null) ConsoleCreated(this, EventArgs.Empty);
     return pythonConsole;
 }