Przeglądaj źródła

trying to make the tcpwrapper python3+ compatible

Former-commit-id: 0160faea45f0abf9785bd47492dc98ecc44cce45
Daniele Panozzo 9 lat temu
rodzic
commit
7b9284c5d4
2 zmienionych plików z 6 dodań i 2 usunięć
  1. 2 2
      python/102_DrawMeshTCP.py
  2. 4 0
      python/CMakeLists.txt

+ 2 - 2
python/102_DrawMeshTCP.py

@@ -10,7 +10,7 @@ igl.read_triangle_mesh("../tutorial/shared/armadillo.obj", V, F)
 time2 = time.time()
 time2 = time.time()
 
 
 
 
-print 'Loading mesh (%d vertices) %0.3f ms' % (V.rows(),(time2-time1)*1000.0)
+print('Loading mesh (%d vertices) %0.3f ms' % (V.rows(),(time2-time1)*1000.0))
 
 
 
 
 # Plot the mesh
 # Plot the mesh
@@ -19,4 +19,4 @@ viewer.data.set_mesh(V, F);
 viewer.launch();
 viewer.launch();
 time3 = time.time()
 time3 = time.time()
 
 
-print 'Sending to TCP viewer took %0.3f ms' % ((time3-time2)*1000.0)
+print('Sending to TCP viewer took %0.3f ms' % ((time3-time2)*1000.0))

+ 4 - 0
python/CMakeLists.txt

@@ -25,6 +25,10 @@ find_package(OPENGL REQUIRED)
 # SET(PYTHON_LIBRARIES "D:/Python34/libs/python34.lib")
 # SET(PYTHON_LIBRARIES "D:/Python34/libs/python34.lib")
 # SET(PYTHON_INCLUDE_DIR "D:/Python34/include")
 # SET(PYTHON_INCLUDE_DIR "D:/Python34/include")
 
 
+# Force a specific python version
+# SET(PYTHON_LIBRARIES "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5m.dylib")
+# SET(PYTHON_INCLUDE_DIR "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/include/python3.5m")
+
 set(Python_ADDITIONAL_VERSIONS 3.4.3 3.5 3.6)
 set(Python_ADDITIONAL_VERSIONS 3.4.3 3.5 3.6)
 find_package(PythonLibs REQUIRED)
 find_package(PythonLibs REQUIRED)
 find_package(PythonInterp REQUIRED)
 find_package(PythonInterp REQUIRED)