Gui::InteractiveInterpreter Class Reference

This class implements an interactive Python interpreter. More...

#include <PythonConsole.h>

List of all members.

Public Member Functions

void clearBuffer ()
int compileCommand (const char *) const
 Compile a command and determine whether it is incomplete.
QStringList getBuffer () const
 InteractiveInterpreter ()
bool push (const char *)
 Store the line into the internal buffer and compile the total buffer.
void setBuffer (const QStringList &)
 ~InteractiveInterpreter ()

Detailed Description

This class implements an interactive Python interpreter.

Author:
Werner Mayer

Definition at line 40 of file PythonConsole.h.


Constructor & Destructor Documentation

InteractiveInterpreter::InteractiveInterpreter (  ) 

Definition at line 100 of file PythonConsole.cpp.

References Gui::InteractiveInterpreterP::interpreter.

InteractiveInterpreter::~InteractiveInterpreter (  ) 

Member Function Documentation

void InteractiveInterpreter::clearBuffer (  ) 

Definition at line 323 of file PythonConsole.cpp.

References Gui::InteractiveInterpreterP::buffer.

int InteractiveInterpreter::compileCommand ( const char *  source  )  const

Compile a command and determine whether it is incomplete.

The source string may contain line feeds and/or carriage returns.
Return value:

  • Return 1 if the command is incomplete
  • Return 0 if the command is complete and valid
  • Return -1 if the command is a syntax error

(OverflowError and ValueError can be produced by malformed literals).

Definition at line 183 of file PythonConsole.cpp.

References Gui::InteractiveInterpreterP::interpreter.

QStringList InteractiveInterpreter::getBuffer (  )  const

Definition at line 313 of file PythonConsole.cpp.

References Gui::InteractiveInterpreterP::buffer.

bool InteractiveInterpreter::push ( const char *  line  ) 

Store the line into the internal buffer and compile the total buffer.

In case it is a complete Python command the buffer is emptied.

Definition at line 289 of file PythonConsole.cpp.

References Gui::InteractiveInterpreterP::buffer.

void InteractiveInterpreter::setBuffer ( const QStringList &  buf  ) 

Definition at line 318 of file PythonConsole.cpp.

References Gui::InteractiveInterpreterP::buffer.


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:00 2011 for FreeCAD by  doxygen 1.6.1