\hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter}{\section{Python\-Interpreter Class Reference}
\label{class_s_c_i_run_1_1_core_1_1_python_interpreter}\index{Python\-Interpreter@{Python\-Interpreter}}
}


A wrapper class of the python interpreter.  




{\ttfamily \#include $<$Python\-Interpreter.\-h$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef \\*
boost\-::signals2\-::signal$<$ void(const \\*
std\-::string \&) $>$ \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_a5826d03f6cd3b6b294a3ea210c897eb2}{console\-\_\-output\-\_\-signal\-\_\-type}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_ad6da18174ed9892c214e56bac27bfc7f}{print\-\_\-banner} ()
\begin{DoxyCompactList}\small\item\em Print the basic information about the python interpreter to output\-\_\-signal\-\_\-. \end{DoxyCompactList}\item 
void \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_adb2b0ece1733bfaaf60351fe251b7d9d}{run\-\_\-string} (const std\-::string \&command)
\item 
void \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_a7d09a565be64c4082c52128749e8eec8}{run\-\_\-script} (const std\-::string \&script)
\item 
void \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_ab0779ea7cb05f632f60ccb5e6a243526}{run\-\_\-file} (const std\-::string \&file\-\_\-name)
\item 
void \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_aebc9afd317d656680550a13818e71917}{interrupt} ()
\begin{DoxyCompactList}\small\item\em Interrupt the current execution. \end{DoxyCompactList}\item 
void \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_a53c0794d8ffed8ee1b3cdc089db890a0}{start\-\_\-terminal} ()
\begin{DoxyCompactList}\small\item\em To be implemented. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std\-::string \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_af54a94dbe765436342f8cd3b83c60ff6}{Escape\-Single\-Quoted\-String} (const std\-::string \&input\-\_\-str)
\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_a5826d03f6cd3b6b294a3ea210c897eb2}{console\-\_\-output\-\_\-signal\-\_\-type} \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_a198dfe7e1a3a25654826c6e145513eeb}{prompt\-\_\-signal\-\_\-}
\item 
\hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_a5826d03f6cd3b6b294a3ea210c897eb2}{console\-\_\-output\-\_\-signal\-\_\-type} \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_a3e2f449dcd5f550e88c680f91073ad78}{error\-\_\-signal\-\_\-}
\item 
\hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_a5826d03f6cd3b6b294a3ea210c897eb2}{console\-\_\-output\-\_\-signal\-\_\-type} \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_afbed6777153b8d94cc6bc93e86d8e256}{output\-\_\-signal\-\_\-}
\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{class_s_c_i_run_1_1_core_1_1_python_interpreter_a13a25e6de8c0d27f71b42ff0c9ac755b}{\-::\-Python\-Std\-I\-O}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
A wrapper class of the python interpreter. 

It calls the python interpreter on a separate thread. 

\subsection{Member Typedef Documentation}
\hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_a5826d03f6cd3b6b294a3ea210c897eb2}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!console\-\_\-output\-\_\-signal\-\_\-type@{console\-\_\-output\-\_\-signal\-\_\-type}}
\index{console\-\_\-output\-\_\-signal\-\_\-type@{console\-\_\-output\-\_\-signal\-\_\-type}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{console\-\_\-output\-\_\-signal\-\_\-type}]{\setlength{\rightskip}{0pt plus 5cm}typedef boost\-::signals2\-::signal$<$ void ( const std\-::string\& ) $>$ {\bf console\-\_\-output\-\_\-signal\-\_\-type}}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_a5826d03f6cd3b6b294a3ea210c897eb2}


\subsection{Member Function Documentation}
\hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_af54a94dbe765436342f8cd3b83c60ff6}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!Escape\-Single\-Quoted\-String@{Escape\-Single\-Quoted\-String}}
\index{Escape\-Single\-Quoted\-String@{Escape\-Single\-Quoted\-String}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{Escape\-Single\-Quoted\-String}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string Escape\-Single\-Quoted\-String (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{input\-\_\-str}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_af54a94dbe765436342f8cd3b83c60ff6}
Escape the quotes(') and backslashes() in a string so it can be used as a python string enclosed by a pair of single quotes. \hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_aebc9afd317d656680550a13818e71917}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!interrupt@{interrupt}}
\index{interrupt@{interrupt}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{interrupt}]{\setlength{\rightskip}{0pt plus 5cm}void interrupt (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_aebc9afd317d656680550a13818e71917}


Interrupt the current execution. 

\hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_ad6da18174ed9892c214e56bac27bfc7f}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!print\-\_\-banner@{print\-\_\-banner}}
\index{print\-\_\-banner@{print\-\_\-banner}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{print\-\_\-banner}]{\setlength{\rightskip}{0pt plus 5cm}void print\-\_\-banner (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_ad6da18174ed9892c214e56bac27bfc7f}


Print the basic information about the python interpreter to output\-\_\-signal\-\_\-. 

\hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_ab0779ea7cb05f632f60ccb5e6a243526}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!run\-\_\-file@{run\-\_\-file}}
\index{run\-\_\-file@{run\-\_\-file}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{run\-\_\-file}]{\setlength{\rightskip}{0pt plus 5cm}void run\-\_\-file (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{file\-\_\-name}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_ab0779ea7cb05f632f60ccb5e6a243526}
Execute a python script from file. N\-O\-T\-E\-: The script is run in its own local namespace. \hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_a7d09a565be64c4082c52128749e8eec8}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!run\-\_\-script@{run\-\_\-script}}
\index{run\-\_\-script@{run\-\_\-script}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{run\-\_\-script}]{\setlength{\rightskip}{0pt plus 5cm}void run\-\_\-script (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{script}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_a7d09a565be64c4082c52128749e8eec8}
Execute a python script. N\-O\-T\-E\-: The script is run in its own local namespace. \hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_adb2b0ece1733bfaaf60351fe251b7d9d}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!run\-\_\-string@{run\-\_\-string}}
\index{run\-\_\-string@{run\-\_\-string}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{run\-\_\-string}]{\setlength{\rightskip}{0pt plus 5cm}void run\-\_\-string (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{command}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_adb2b0ece1733bfaaf60351fe251b7d9d}
Execute a single python command. N\-O\-T\-E\-: The command is run in the main namespace. \hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_a53c0794d8ffed8ee1b3cdc089db890a0}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!start\-\_\-terminal@{start\-\_\-terminal}}
\index{start\-\_\-terminal@{start\-\_\-terminal}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{start\-\_\-terminal}]{\setlength{\rightskip}{0pt plus 5cm}void start\-\_\-terminal (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_a53c0794d8ffed8ee1b3cdc089db890a0}


To be implemented. 



\subsection{Friends And Related Function Documentation}
\hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_a13a25e6de8c0d27f71b42ff0c9ac755b}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!\-::\-Python\-Std\-I\-O@{\-::\-Python\-Std\-I\-O}}
\index{\-::\-Python\-Std\-I\-O@{\-::\-Python\-Std\-I\-O}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{\-::\-Python\-Std\-I\-O}]{\setlength{\rightskip}{0pt plus 5cm}friend class \-::{\bf Python\-Std\-I\-O}\hspace{0.3cm}{\ttfamily [friend]}}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_a13a25e6de8c0d27f71b42ff0c9ac755b}


\subsection{Member Data Documentation}
\hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_a3e2f449dcd5f550e88c680f91073ad78}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!error\-\_\-signal\-\_\-@{error\-\_\-signal\-\_\-}}
\index{error\-\_\-signal\-\_\-@{error\-\_\-signal\-\_\-}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{error\-\_\-signal\-\_\-}]{\setlength{\rightskip}{0pt plus 5cm}{\bf console\-\_\-output\-\_\-signal\-\_\-type} error\-\_\-signal\-\_\-}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_a3e2f449dcd5f550e88c680f91073ad78}
\hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_afbed6777153b8d94cc6bc93e86d8e256}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!output\-\_\-signal\-\_\-@{output\-\_\-signal\-\_\-}}
\index{output\-\_\-signal\-\_\-@{output\-\_\-signal\-\_\-}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{output\-\_\-signal\-\_\-}]{\setlength{\rightskip}{0pt plus 5cm}{\bf console\-\_\-output\-\_\-signal\-\_\-type} output\-\_\-signal\-\_\-}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_afbed6777153b8d94cc6bc93e86d8e256}
\hypertarget{class_s_c_i_run_1_1_core_1_1_python_interpreter_a198dfe7e1a3a25654826c6e145513eeb}{\index{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}!prompt\-\_\-signal\-\_\-@{prompt\-\_\-signal\-\_\-}}
\index{prompt\-\_\-signal\-\_\-@{prompt\-\_\-signal\-\_\-}!SCIRun::Core::PythonInterpreter@{S\-C\-I\-Run\-::\-Core\-::\-Python\-Interpreter}}
\subsubsection[{prompt\-\_\-signal\-\_\-}]{\setlength{\rightskip}{0pt plus 5cm}{\bf console\-\_\-output\-\_\-signal\-\_\-type} prompt\-\_\-signal\-\_\-}}\label{class_s_c_i_run_1_1_core_1_1_python_interpreter_a198dfe7e1a3a25654826c6e145513eeb}


The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Core/\-Python/\hyperlink{_python_interpreter_8h}{Python\-Interpreter.\-h}\item 
Core/\-Python/\hyperlink{_python_interpreter_8cc}{Python\-Interpreter.\-cc}\end{DoxyCompactItemize}
