![]() |
KiCad PCB EDA Suite
|
#include <Python.h>
#include <wx/string.h>
#include <wx/arrstr.h>
Go to the source code of this file.
Classes | |
class | PyLOCK |
Functions | |
bool | pcbnewInitPythonScripting (const char *aStockScriptingPath, const char *aUserScriptingPath) |
Initialize the Python engine inside pcbnew. More... | |
void | pcbnewFinishPythonScripting () |
void | pcbnewGetUnloadableScriptNames (wxString &aNames) |
Collect the list of python scripts which could not be loaded. More... | |
void | pcbnewGetScriptsSearchPaths (wxString &aNames) |
Collect the list of paths where python scripts are searched. More... | |
void | pcbnewGetWizardsBackTrace (wxString &aNames) |
Return the backtrace of errors (if any) when wizard python scripts are loaded. More... | |
void | pcbnewUpdatePythonEnvVar (const wxString &aVar, const wxString &aValue) |
Set an environment variable in the current Python interpreter. More... | |
bool | IsWxPythonLoaded () |
wxString | PyStringToWx (PyObject *str) |
wxArrayString | PyArrayStringToWx (PyObject *arr) |
wxString | PyErrStringWithTraceback () |
wxString | PyScriptingPath (bool aUserPath=false) |
Find the Python scripting path. More... | |
wxString | PyPluginsPath (bool aUserPath=false) |
bool IsWxPythonLoaded | ( | ) |
Definition at line 77 of file python_scripting.cpp.
References wxPythonLoaded.
Referenced by PCB::IFACE::OnKifaceEnd(), PCB_EDIT_FRAME::ReCreateHToolbar(), and PCB_EDIT_FRAME::setupUIConditions().
void pcbnewFinishPythonScripting | ( | ) |
Definition at line 365 of file python_scripting.cpp.
References g_PythonMainTState.
Referenced by PCB::IFACE::OnKifaceEnd().
void pcbnewGetScriptsSearchPaths | ( | wxString & | aNames | ) |
Collect the list of paths where python scripts are searched.
aNames | is a wxString which will contain the paths (separated by ' ') |
Definition at line 331 of file python_scripting.cpp.
References pcbnewRunPythonMethodWithReturnedString().
void pcbnewGetUnloadableScriptNames | ( | wxString & | aNames | ) |
Collect the list of python scripts which could not be loaded.
aNames | is a wxString which will contain the filenames (separated by ' ') |
Definition at line 325 of file python_scripting.cpp.
References pcbnewRunPythonMethodWithReturnedString().
void pcbnewGetWizardsBackTrace | ( | wxString & | aNames | ) |
Return the backtrace of errors (if any) when wizard python scripts are loaded.
aNames | is a wxString which will contain the trace |
Definition at line 337 of file python_scripting.cpp.
References pcbnewRunPythonMethodWithReturnedString(), and wxStringSplit().
bool pcbnewInitPythonScripting | ( | const char * | aStockScriptingPath, |
const char * | aUserScriptingPath | ||
) |
Initialize the Python engine inside pcbnew.
Initialize the Python engine inside pcbnew.
This initializes all the wxPython interface and returns the python thread control structure
Definition at line 162 of file python_scripting.cpp.
References g_PythonMainTState, Pgm(), swigAddBuiltin(), swigAddModules(), swigSwitchPythonBuiltin(), and wxPythonLoaded.
void pcbnewUpdatePythonEnvVar | ( | const wxString & | aVar, |
const wxString & | aValue | ||
) |
Set an environment variable in the current Python interpreter.
aVar | is the variable to set |
aValue | is the value to give it |
Definition at line 394 of file python_scripting.cpp.
References PyEscapeString(), TO_UTF8, and traceEnvVars.
Referenced by PCB_EDIT_FRAME::PythonSyncEnvironmentVariables(), and PCB_EDIT_FRAME::PythonSyncProjectName().
wxArrayString PyArrayStringToWx | ( | PyObject * | arr | ) |
Definition at line 572 of file python_scripting.cpp.
References FROM_UTF8(), and NULL.
Referenced by PYTHON_FOOTPRINT_WIZARD::CallRetArrayStrMethod(), and PyErrStringWithTraceback().
wxString PyErrStringWithTraceback | ( | ) |
Definition at line 611 of file python_scripting.cpp.
References NULL, and PyArrayStringToWx().
Referenced by PYTHON_ACTION_PLUGIN::CallMethod(), PYTHON_FOOTPRINT_WIZARD::CallMethod(), and pcbnewRunPythonMethodWithReturnedString().
wxString PyPluginsPath | ( | bool | aUserPath = false | ) |
Definition at line 697 of file python_scripting.cpp.
References PyScriptingPath().
Referenced by PCB_EDIT_FRAME::PythonPluginsShowFolder().
wxString PyScriptingPath | ( | bool | aUserPath = false | ) |
Find the Python scripting path.
Definition at line 670 of file python_scripting.cpp.
References PATHS::GetStockScriptingPath(), PATHS::GetUserScriptingPath(), and path.
Referenced by PyPluginsPath(), and PythonPluginsReloadBase().
wxString PyStringToWx | ( | PyObject * | str | ) |
Definition at line 542 of file python_scripting.cpp.
References FROM_UTF8(), and NULL.
Referenced by PYTHON_ACTION_PLUGIN::CallRetStrMethod(), PYTHON_FOOTPRINT_WIZARD::CallRetStrMethod(), and PYTHON_FOOTPRINT_WIZARD::GetParameterPageName().