public PythonOutputStream(PythonConsole console, ITextEditor textEditor)
 {
     _console        = console;
     this.textEditor = textEditor;
 }
Esempio n. 2
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);
     return pythonConsole;
 }
Esempio n. 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)
 {
     pythonConsole = new PythonConsole(textEditor, commandLine, this);
     SetScriptStream(new PythonOutputStream(pythonConsole, textEditor));
     return(pythonConsole);
 }