Initial release of pl_editor, the page layout and title block editor.

This commit is contained in:
jean-pierre charras
2013-07-19 20:27:22 +02:00
parent ba16d9e763
commit 50743cf3ba
123 changed files with 24073 additions and 2006 deletions
+9 -11
View File
@@ -132,7 +132,7 @@ static void swigSwitchPythonBuiltin()
PyThreadState* g_PythonMainTState;
bool pcbnewInitPythonScripting()
bool pcbnewInitPythonScripting( const char * aUserPluginsPath )
{
swigAddBuiltin(); // add builtin functions
swigAddModules(); // add our own modules
@@ -159,25 +159,23 @@ bool pcbnewInitPythonScripting()
g_PythonMainTState = wxPyBeginAllowThreads();
// load pcbnew inside python, and load all the user plugins, TODO: add system wide plugins
#endif
// load pcbnew inside python, and load all the user plugins, TODO: add system wide plugins
{
char cmd[1024];
PyLOCK lock;
PyRun_SimpleString( "import sys, traceback\n"
"sys.path.append(\".\")\n"
"import pcbnew\n"
"pcbnew.LoadPlugins()"
);
sprintf( cmd, "import sys, traceback\n"
"sys.path.append(\".\")\n"
"import pcbnew\n"
"pcbnew.LoadPlugins(\"%s\")", aUserPluginsPath );
PyRun_SimpleString( cmd );
}
return true;
}
void pcbnewFinishPythonScripting()
void pcbnewFinishPythonScripting( char )
{
#ifdef KICAD_SCRIPTING_WXPYTHON
wxPyEndAllowThreads( g_PythonMainTState );