+/*!
+ Convenient method for executing a Python command,
+ as if the user typed it manually
+*/
+void PythonConsole_PyEditor::exec( const QString& command )
+{
+ // Some interactive command is being executed in this editor -> do nothing
+ if ( isReadOnly() )
+ return;
+ int para=paragraphs()-1;
+ removeParagraph( para );
+ _currentPrompt = READY_PROMPT;
+ _buf.truncate(0);
+ _isInHistory = false;
+ setText( "\n" + _currentPrompt);
+ setText( command + "\n" );
+ handleReturn();
+}
+