Salome HOME
projects
/
samples
/
pyhello.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge Python 3 porting.
[samples/pyhello.git]
/
src
/
PYHELLO
/
PYHELLO.py
diff --git
a/src/PYHELLO/PYHELLO.py
b/src/PYHELLO/PYHELLO.py
index c5540f94e591c8f639146edbc22c048f2ea9403c..3303c8fdd1dd94e99e2d6241b119163faec4977f 100755
(executable)
--- a/
src/PYHELLO/PYHELLO.py
+++ b/
src/PYHELLO/PYHELLO.py
@@
-29,8
+29,7
@@
import PYHELLO_ORB__POA
import SALOME_ComponentPy
import SALOME_DriverPy
import SALOMEDS
import SALOME_ComponentPy
import SALOME_DriverPy
import SALOMEDS
-
-from PYHELLO_utils import *
+from PYHELLO_utils import findOrCreateComponent, objectID, moduleName
class PYHELLO(PYHELLO_ORB__POA.PYHELLO_Gen,
SALOME_ComponentPy.SALOME_ComponentPy_i,
class PYHELLO(PYHELLO_ORB__POA.PYHELLO_Gen,
SALOME_ComponentPy.SALOME_ComponentPy_i,
@@
-97,11
+96,11
@@
class PYHELLO(PYHELLO_ORB__POA.PYHELLO_Gen,
study = getStudy()
father = study.FindComponent( moduleName() )
if father:
study = getStudy()
father = study.FindComponent( moduleName() )
if father:
- iter
= study.NewChildIterator( father
)
- while iter.More():
- name = iter.Value().GetName()
+ iter
ator = study.NewChildIterator(father
)
+ while iter
ator
.More():
+ name = iter
ator
.Value().GetName()
if name: names.append( name )
if name: names.append( name )
- iter.Next()
+ iter
ator
.Next()
pass
pass
if names:
pass
pass
if names:
@@
-110,12
+109,12
@@
class PYHELLO(PYHELLO_ORB__POA.PYHELLO_Gen,
abuffer += [ "" ]
abuffer += [ "pyhello = salome.lcc.FindOrLoadComponent( 'FactoryServerPy', '%s' )" % moduleName() ]
abuffer += [ "" ]
abuffer += [ "" ]
abuffer += [ "pyhello = salome.lcc.FindOrLoadComponent( 'FactoryServerPy', '%s' )" % moduleName() ]
abuffer += [ "" ]
- abuffer += [ "pyhello.createObject( '%s'
)" % name for name in names ]
+ abuffer += [ "pyhello.createObject( '%s')" % name for name in names ]
abuffer += [ "" ]
pass
if isMultiFile:
abuffer += [ "" ]
pass
if isMultiFile:
- abuffer
= [ " " + s for s in abuffer ]
- abuffer[0:0]
= [ "def RebuildData():" ]
- abuffer
+= [ "
pass" ]
+ abuffer = [ " " + s for s in abuffer ]
+ abuffer[0:0] = [ "def RebuildData():" ]
+ abuffer
+= [ "
pass" ]
abuffer += [ "\0" ]
return ("\n".join( abuffer ), 1)
abuffer += [ "\0" ]
return ("\n".join( abuffer ), 1)