Improve sys.stdin redirection mechanism
This commit is contained in:
@@ -96,6 +96,12 @@ class GuiExport PythonConsole : public TextEdit, public WindowParameter
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Prompt {
|
||||
Complete = 0,
|
||||
Incomplete = 1,
|
||||
Flush = 2
|
||||
};
|
||||
|
||||
PythonConsole(QWidget *parent = 0);
|
||||
~PythonConsole();
|
||||
|
||||
@@ -108,6 +114,7 @@ public Q_SLOTS:
|
||||
void onCopyHistory();
|
||||
void onCopyCommand();
|
||||
void onClearConsole();
|
||||
void onFlush();
|
||||
|
||||
private Q_SLOTS:
|
||||
void visibilityChanged (bool visible);
|
||||
@@ -131,7 +138,7 @@ protected:
|
||||
private:
|
||||
void runSource(const QString&);
|
||||
bool isComment(const QString&) const;
|
||||
void printPrompt(bool);
|
||||
void printPrompt(Prompt);
|
||||
void insertPythonOutput(const QString&);
|
||||
void insertPythonError (const QString&);
|
||||
void runSourceFromMimeData(const QString&);
|
||||
|
||||
Reference in New Issue
Block a user