From: eduardo.davila@creatis.insa-lyon.fr Date: Fri, 10 Nov 2023 15:57:43 +0000 (+0100) Subject: #3512 clean bbs2 python version X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=7a86b21a88862240b2b56d165433cbcbb50ab316;p=bbtk.git #3512 clean bbs2 python version --- 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); } //=========================================================================