Importing sample from script is prohibited under Mac
GUI/View/SampleDesigner/SampleListView.cpp has the following lines:
#ifdef Q_OS_MAC
if (Base::System::getenv("PYTHONHOME").empty())
m_importSampleAction->setEnabled(false);
#endif
Now it leads to disabled action for importing sample from Python script.