/usr/include/vtk-6.3/vtkPythonInteractiveInterpreter.h is in libvtk6-dev 6.3.0+dfsg1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkPythonInteractiveInterpreter.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkPythonInteractiveInterpreter - interpreter for interactive shells.
// .SECTION Description
// vtkPythonInteractiveInterpreter provides an interpreter that can be used in
// interactive shells. It mimicks the behaviour of the interactive
// console (much like the default Python shell) providing the "read-eval-print"
// loops. It also handles incomplete statements correctly. It uses "code"
// module provided by Python standard library to achieve this.
// It uses vtkPythonInterpreter to ensure that the global
// Python environment is setup correctly. Note that any time the
// vtkPythonInterpreter::Finalize() is called, the interactive interpreter will
// be destroyed as well. Subsequent calls to vtkPythonInterpreter::Push() will
// reinitialize Python as start a new interactive interpreter shell.
//
// This class also observers and forwards all events invoked by a
// vtkPythonInterpreter instance include vtkCommand::EnterEvent,
// vtkCommand::ExitEvent, vtkCommand::UpdateEvent, vtkCommand::ErrorEvent and
// vtkCommand::SetOutputEvent.
#ifndef vtkPythonInteractiveInterpreter_h
#define vtkPythonInteractiveInterpreter_h
#include "vtkObject.h"
#include "vtkPythonInterpreterModule.h" // For export macro
class vtkPythonInterpreter;
class VTKPYTHONINTERPRETER_EXPORT vtkPythonInteractiveInterpreter : public vtkObject
{
public:
static vtkPythonInteractiveInterpreter* New();
vtkTypeMacro(vtkPythonInteractiveInterpreter, vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Push a line of code. It should have have trailing newlines. It can have
// internal newlines. This can accept incomplete input. A command is executed
// only after the complete input is received. Look at Python module
// documentation for code.InteractiveConsole.push() for further details. The
// return value is True if more input is required, False if the line was dealt
// with in some way.
bool Push(const char* const code);
// Description:
// This destroys the internal code.InteractiveConsole instance. Hence, next
// time Push() will be called, it will use a brand new instance of
// code.InteractiveConsole().
void Reset();
// Description:
// Executes the given python source code using the context given by the
// locals() object used by this interactive console. This is similar to
// using vtkPythonInterpreter::RunSimpleString(), except that method will
// execute code in the context of the __main__ module. Returns 0 on success
// or -1 if an exception was raised.
int RunStringWithConsoleLocals(const char* script);
// Description:
// Provides access to the internal PyObject instances used for the
// code.InteractiveConsole() as well as the dictionary for the locals of the
// code.InteractiveConsole() instance. Do not use if you are not sure what
// these are for.
void* GetInteractiveConsolePyObject();
void* GetInteractiveConsoleLocalsPyObject();
//BTX
protected:
vtkPythonInteractiveInterpreter();
~vtkPythonInteractiveInterpreter();
void HandleEvents(vtkObject* caller, unsigned long eventid, void* calldata);
private:
vtkPythonInteractiveInterpreter(const vtkPythonInteractiveInterpreter&); // Not implemented.
void operator=(const vtkPythonInteractiveInterpreter&); // Not implemented.
class vtkInternals;
vtkInternals* Internals;
//ETX
};
#endif
|