From: vsr Date: Thu, 28 Aug 2014 09:39:33 +0000 (+0400) Subject: Merge remote branch 'origin/V7_4_BR' X-Git-Tag: V7_5_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=97d7c38edc8a63a77c41ef28c5d39bd197bda0d8;hp=7fdd12723ceeeaebe22103e2e458a1a5fbb00ef9;p=samples%2Fpyhello.git Merge remote branch 'origin/V7_4_BR' --- diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index f616bee..eedab54 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -38,4 +38,10 @@ +
+ +
+
+ +
diff --git a/src/PYHELLO/PYHELLO.py b/src/PYHELLO/PYHELLO.py index 2d3ada4..b9592b9 100644 --- a/src/PYHELLO/PYHELLO.py +++ b/src/PYHELLO/PYHELLO.py @@ -84,9 +84,8 @@ class PYHELLO(PYHELLO_ORB__POA.PYHELLO_Gen, """ Dump module data to the Python script. """ - def DumpPython( self, study, isPublished ): + def DumpPython( self, study, isPublished, isMultiFile ): abuffer = [] - abuffer.append( "def RebuildData( theStudy ):" ) names = [] father = study.FindComponent( moduleName() ) if father: @@ -98,16 +97,19 @@ class PYHELLO(PYHELLO_ORB__POA.PYHELLO_Gen, pass pass if names: - abuffer += [ " from batchmode_salome import lcc" ] - abuffer += [ " import PYHELLO_ORB" ] - abuffer += [ " " ] - abuffer += [ " pyhello = lcc.FindOrLoadComponent( 'FactoryServerPy', '%s' )" % moduleName() ] - abuffer += [ " " ] - abuffer += [ " pyhello.createObject( theStudy, '%s' )" % name for name in names ] + abuffer += [ "from salome import lcc" ] + abuffer += [ "import PYHELLO_ORB" ] + abuffer += [ "" ] + abuffer += [ "pyhello = lcc.FindOrLoadComponent( 'FactoryServerPy', '%s' )" % moduleName() ] + abuffer += [ "" ] + abuffer += [ "pyhello.createObject( theStudy, '%s' )" % name for name in names ] + abuffer += [ "" ] pass - abuffer += [ " " ] - abuffer.append( " pass" ) - abuffer.append( "\0" ) + if isMultiFile: + abuffer = [ " " + s for s in abuffer ] + abuffer[0:0] = [ "def RebuildData( theStudy ):" ] + abuffer += [ " pass" ] + abuffer += [ "\0" ] return ("\n".join( abuffer ), 1) """