\hypertarget{a14860_python_scripting_batch_mode}{}\section{Open\+Flipper Batch mode with python}\label{a14860_python_scripting_batch_mode}
Open\+Flipper can be started in batch mode without a graphical user interface by providing \char`\"{}-\/b\char`\"{} as a command line option. Furthermore you have to provide an Open\+Flipper python script (extension is .ofp), which will get executed. To get output to the command line, you also have to provide the command line switch \char`\"{}-\/c\char`\"{}. Only plugins which support batch mode ( They implement an nogui() function ), will be loaded. For example, no renderers, postprocessors or other plugins providing only user interface or graphical functionality will be loaded. You can see on the command line (when \char`\"{}-\/c\char`\"{} is given), which plugins are activated and which are skipped in batch mode.\hypertarget{a14860_python_scripting_datattypes}{}\section{Data\+Types}\label{a14860_python_scripting_datattypes}
\hypertarget{a14860_python_scripting_matrixtype}{}\subsection{Matrix4x4 data type}\label{a14860_python_scripting_matrixtype}
The Matrix4x4T type used in the C++ code is mapped from python. Details can be found here\+: \hyperlink{python_scripting_matrix4x4_type}{Matrix4x4 data type used for python scripting}\hypertarget{a14860_python_scripting_vectortype}{}\subsection{3 Dimensional vector type}\label{a14860_python_scripting_vectortype}
The Vector type used in the C++ code is mapped from python. Details can be found here\+: \hyperlink{python_scripting_vector_type}{Vector data type used for python scripting}\hypertarget{a14860_python_scripting_idlisttype}{}\subsection{I\+D\+List data type}\label{a14860_python_scripting_idlisttype}
The Id\+List type used in the C++ code is mapped from python. Details can be found here\+: \hyperlink{python_scripting_IDList_type}{I\+D\+List data type used for python scripting} \hypertarget{python_scripting_matrix4x4_type}{}\section{Matrix4x4 data type used for python scripting}\label{python_scripting_matrix4x4_type}
The matrix type Matrix4x4 is mapped to python to handle matrix operations.

The integrated conversion can map the C++ Matrix4x4 type to and from a tuple, a list or a numpy array. The preferred choice is the numpy array. Tuple and list have to contain 16 elements. A numpy array has to have a dimension of 2, with 4x4 elements. All data is assumed to be given column major. Therefore the first for elements define the first column and so on.

Creating a matrix in python is the done like in the following example\+: 
\begin{DoxyCode}
\textcolor{keyword}{import} numpy as np

matr = np.array( [[1.0,0.0,0.0,0.0],[0.0,1.0,0.0,0.0],[0.0,0.0,1.0,0.0],[0.0,0.0,0.0,1.0]])
\end{DoxyCode}


The conversion from C++ to python will always create a numpy array on the python side. \hypertarget{python_scripting_vector_type}{}\section{Vector data type used for python scripting}\label{python_scripting_vector_type}
The matrix type Vector is mapped to python to handle Vector operations.

The integrated conversion can map the C++ Vector type to and from a tuple, a list or a numpy array. The preferred choice is the numpy array. Tuple and list have to contain 3 elements. A numpy array has to have a dimension of 1, with 3 elements.

Creating a matrix in python is the done like in the following example\+: 
\begin{DoxyCode}
\textcolor{keyword}{import} numpy as np

vector = np.array([1.0,0.0,0.0]);
\end{DoxyCode}


The conversion from C++ to python will always create a numpy array on the python side. \hypertarget{python_scripting_IDList_type}{}\section{I\+D\+List data type used for python scripting}\label{python_scripting_IDList_type}
The list type Id\+List is mapped to python.

The integrated conversion can map the C++ Id\+List type to and from a tuple, a list or a numpy array. The preferred choice is the numpy array.

Creating a list in python is the done like in the following example\+: 
\begin{DoxyCode}
\textcolor{keyword}{import} numpy as np

list = np.array( [3,16,18])
\end{DoxyCode}


The conversion from C++ to python will always create a numpy array on the python side. 