25#include <python_manager.h> 
   82    wxString interpreter = PYTHON_MANAGER::FindPythonInterpreter();
 
   84    if( !interpreter.IsEmpty() )
 
 
  104        m_stApiStatus->SetLabel( wxString::Format( 
_( 
"Listening at %s" ),
 
  105                                                      Pgm().GetApiServer().SocketPath() ) );
 
  112    m_stApiStatus->SetLabel( 
_( 
"This installation of KiCad does not have API support enabled." ) );
 
 
  121        m_stPythonStatus->SetLabel( 
_( 
"KiCad API is not enabled; external Python plugins will " 
  122                                       "not be available" ) );
 
  130    if( !pythonExe.FileExists() )
 
  132        m_stPythonStatus->SetLabel( 
_( 
"No valid Python interpreter chosen; external Python " 
  133                                       "plugins will not be available" ) );
 
  137    PYTHON_MANAGER manager( pythonExe.GetFullPath() );
 
  139    manager.Execute( { wxS( 
"--version" ) },
 
  140                     [&]( 
int aRetCode, 
const wxString& aStdOut, 
const wxString& aStdErr )
 
  144                         if( aRetCode == 0 && aStdOut.Contains( wxS( 
"Python 3" ) ) )
 
  146                             msg = wxString::Format( 
_( 
"Found %s" ), aStdOut );
 
  151                             msg = 
_( 
"Not a valid Python 3 interpreter" );
 
 
wxFilePickerCtrl * m_pickerPythonInterpreter
 
PANEL_PLUGIN_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
wxStaticText * m_stPythonStatus
 
wxCheckBox * m_cbEnableApi
 
wxStaticText * m_stApiStatus
 
void OnPythonInterpreterChanged(wxFileDirPickerEvent &event) override
 
void validatePythonInterpreter()
 
bool m_pythonInterpreterValid
 
void ResetPanel() override
Reset the contents of this panel.
 
PANEL_PLUGIN_SETTINGS(wxWindow *aParent)
 
void OnEnableApiChecked(wxCommandEvent &aEvent) override
 
void OnBtnDetectAutomaticallyClicked(wxCommandEvent &aEvent) override
 
bool TransferDataFromWindow() override
 
bool TransferDataToWindow() override
 
void updateApiStatusText()
 
virtual SETTINGS_MANAGER & GetSettingsManager() const
 
COMMON_SETTINGS * GetCommonSettings() const
Retrieve the common settings shared by all applications.
 
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
 
PGM_BASE & Pgm()
The global program "get" accessor.
 
wxString python_interpreter
 
Functions to provide common constants and other functions to assist in making a consistent UI.