Browse Source

API: Normalize paths to Python interpreter

pcb_db
Jon Evans 10 months ago
parent
commit
d83e6326a5
  1. 9
      scripting/python_manager.cpp
  2. 4
      scripting/python_manager.h

9
scripting/python_manager.cpp

@ -24,6 +24,7 @@
#include <paths.h>
#include <python_manager.h>
#include <wx_filename.h>
class PYTHON_PROCESS : public wxProcess
@ -72,6 +73,14 @@ private:
};
PYTHON_MANAGER::PYTHON_MANAGER( const wxString& aInterpreterPath )
{
wxFileName path( aInterpreterPath );
path.Normalize( FN_NORMALIZE_FLAGS );
m_interpreterPath = path.GetFullPath();
}
void PYTHON_MANAGER::Execute( const wxString& aArgs,
const std::function<void( int, const wxString&,
const wxString& )>& aCallback,

4
scripting/python_manager.h

@ -32,9 +32,7 @@
class KICOMMON_API PYTHON_MANAGER
{
public:
PYTHON_MANAGER( const wxString& aInterpreterPath ) :
m_interpreterPath( aInterpreterPath )
{}
PYTHON_MANAGER( const wxString& aInterpreterPath );
void Execute( const wxString& aArgs,
const std::function<void(int, const wxString&, const wxString&)>& aCallback,

Loading…
Cancel
Save