|
@@ -250,7 +250,7 @@ void ctkAbstractPythonManager::executeFile(const QString& filename)
|
|
|
{
|
|
|
QString path = QFileInfo(filename).absolutePath();
|
|
|
this->executeString(QString("import sys\nsys.path.insert(0, '%1')").arg(path));
|
|
|
- main.evalFile(filename);
|
|
|
+ this->executeString(QString("execfile('%1')").arg(filename));
|
|
|
this->executeString(QString("import sys\nif sys.path[0] == '%1': sys.path.pop(0)").arg(path));
|
|
|
}
|
|
|
}
|