From: rnv Date: Thu, 22 Jun 2017 15:43:54 +0000 (+0300) Subject: Merge Python 3 porting. X-Git-Tag: V9_0_0~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=040386e014d39fbf83b64ed1e5612ff713be29cb;p=samples%2Fhello.git Merge Python 3 porting. --- 040386e014d39fbf83b64ed1e5612ff713be29cb diff --cc bin/test_hello.py index 6f15512,1fe9299..94efb8d --- a/bin/test_hello.py +++ b/bin/test_hello.py @@@ -30,28 -30,28 +30,28 @@@ import HELLO_OR hello = salome.lcc.FindOrLoadComponent('FactoryServer', 'HELLO') # test HELLO module - print "Say hello to John: should be OK" + print("Say hello to John: should be OK") -if hello.hello(salome.myStudy, "John") != HELLO_ORB.OP_OK: +if hello.hello("John") != HELLO_ORB.OP_OK: - print "ERROR: wrong operation code is returned" + print("ERROR: wrong operation code is returned") else: - print "OK" - print "Say hello to John: should answer 'already met'" + print("OK") + print("Say hello to John: should answer 'already met'") -if hello.hello(salome.myStudy, "John") != HELLO_ORB.OP_ERR_ALREADY_MET: +if hello.hello("John") != HELLO_ORB.OP_ERR_ALREADY_MET: - print "ERROR: wrong operation code is returned" + print("ERROR: wrong operation code is returned") else: - print "OK" - print "Say goodbye to Margaret: should answer 'did not meet yet'" + print("OK") + print("Say goodbye to Margaret: should answer 'did not meet yet'") -if hello.goodbye(salome.myStudy, "Margaret") != HELLO_ORB.OP_ERR_DID_NOT_MEET: +if hello.goodbye("Margaret") != HELLO_ORB.OP_ERR_DID_NOT_MEET: - print "ERROR: wrong operation code is returned" + print("ERROR: wrong operation code is returned") else: - print "OK" - print "Say hello to John: should be OK" + print("OK") + print("Say hello to John: should be OK") -if hello.goodbye(salome.myStudy, "John") != HELLO_ORB.OP_OK: +if hello.goodbye("John") != HELLO_ORB.OP_OK: - print "ERROR: wrong operation code is returned" + print("ERROR: wrong operation code is returned") else: - print "OK" - print "Say hello to John: should answer 'did not meet yet'" + print("OK") + print("Say hello to John: should answer 'did not meet yet'") -if hello.goodbye(salome.myStudy, "John") != HELLO_ORB.OP_ERR_DID_NOT_MEET: +if hello.goodbye("John") != HELLO_ORB.OP_ERR_DID_NOT_MEET: - print "ERROR: wrong operation code is returned" + print("ERROR: wrong operation code is returned") else: - print "OK" + print("OK")