From 7a86b21a88862240b2b56d165433cbcbb50ab316 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Fri, 10 Nov 2023 16:57:43 +0100 Subject: [PATCH] #3512 clean bbs2 python version --- kernel/appli/bbs2cpp/bbs2.cxx | 10 +++++----- kernel/src/bbtkComplexBlackBox.cxx | 9 +++------ kernel/src/bbtkInterpreterPython.cxx | 2 ++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/kernel/appli/bbs2cpp/bbs2.cxx b/kernel/appli/bbs2cpp/bbs2.cxx index 25c1290..184b48c 100644 --- a/kernel/appli/bbs2cpp/bbs2.cxx +++ b/kernel/appli/bbs2cpp/bbs2.cxx @@ -97,18 +97,18 @@ int main(int argc, char* argv[]) fprintf(ff,"\n" ); fprintf(ff,"from bbtk.bbtkBlackBox import *\n" ); fprintf(ff,"\n" ); - fprintf(ff,"class %s:\n",fileBase.c_str() ); + fprintf(ff,"class %s(ComplexBlackBox):\n",fileBase.c_str() ); fprintf(ff,"\n" ); - fprintf(ff," def __init__(self):\n" ); - fprintf(ff," self.mCBpy = ComplexBlackBox('%s')\n",file.c_str() ); + fprintf(ff," def __init__(self, nameBox):\n" ); + fprintf(ff," super().__init__(nameBox)\n" ); fprintf(ff,"\n" ); fprintf(ff," def Run(self):\n" ); int i,size=pythonBBTK.size(); for (i=0; i ComplexBlackBox::New('"<GetTypeName()<<"')" <GetTypeName()<<"')" < ComplexBlackBox::New('"<GetTypeName()<<"')" <GetTypeName()<<"')" <pythonBBTK.push_back(code); } //========================================================================= -- 2.47.1