diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt index 4942995..f5f0f92 100644 --- a/pyiec61850/CMakeLists.txt +++ b/pyiec61850/CMakeLists.txt @@ -1,7 +1,7 @@ FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) FIND_PACKAGE(PythonLibs REQUIRED) -FIND_PACKAGE ( PythonInterp REQUIRED ) +FIND_PACKAGE ( PythonInterp ${PYTHONLIBS_VERSION_STRING} EXACT REQUIRED ) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(CMAKE_SWIG_FLAGS "") diff --git a/pyiec61850/test_pyiec61850.py b/pyiec61850/test_pyiec61850.py index a37fd6b..aceb3fd 100755 --- a/pyiec61850/test_pyiec61850.py +++ b/pyiec61850/test_pyiec61850.py @@ -55,20 +55,20 @@ def testClient(): theVal = "testmodelSENSORS/TTMP1.TmpSp.setMag.f" theValType = iec61850.IEC61850_FC_SP temperatureSetpoint = iec61850.IedConnection_readFloatValue(con, theVal, theValType) - print temperatureSetpoint + print(temperatureSetpoint) assert(temperatureValue[1]==0) newValue= temperatureValue[0]+10 err = iec61850.IedConnection_writeFloatValue(con, theVal, theValType, newValue) assert(err==0) temperatureSetpoint = iec61850.IedConnection_readFloatValue(con, theVal, theValType) - print temperatureSetpoint + print(temperatureSetpoint) assert(temperatureSetpoint[0]==newValue) iec61850.IedConnection_close(con) else: - print "Connection error" + print("Connection error") sys.exit(-1) iec61850.IedConnection_destroy(con) - print "client ok" + print("client ok") try: srv=myIECServer() srvThread = threading.Thread(target = srv.run) @@ -78,6 +78,6 @@ try: #signal.pause() except: running = 0 - print "Error :" + print("Error :") traceback.print_exc(file=sys.stdout) sys.exit(-1)