summaryrefslogtreecommitdiff
path: root/src/python/gudhi/nerve_gic.pyx
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-01-14 14:40:41 +0100
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-01-14 14:40:41 +0100
commit587a845289a4e29014f67d4c3379b2b4d6b1f102 (patch)
tree6a43e1ce25342d9707db2362c9577dd680845b1d /src/python/gudhi/nerve_gic.pyx
parent88c30209fe58d29d24d5bba3c137cd5e5def29c5 (diff)
print errors to stderr
Diffstat (limited to 'src/python/gudhi/nerve_gic.pyx')
-rw-r--r--src/python/gudhi/nerve_gic.pyx12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/python/gudhi/nerve_gic.pyx b/src/python/gudhi/nerve_gic.pyx
index 68c06432..5eb9be0d 100644
--- a/src/python/gudhi/nerve_gic.pyx
+++ b/src/python/gudhi/nerve_gic.pyx
@@ -7,11 +7,13 @@
# Modification(s):
# - YYYY/MM Author: Description of the modification
+from __future__ import print_function
from cython cimport numeric
from libcpp.vector cimport vector
from libcpp.utility cimport pair
from libcpp.string cimport string
from libcpp cimport bool
+import sys
import os
from libc.stdint cimport intptr_t
@@ -182,7 +184,7 @@ cdef class CoverComplex:
if os.path.isfile(off_file):
return self.thisptr.read_point_cloud(str.encode(off_file))
else:
- print("file " + off_file + " not found.")
+ print("file " + off_file + " not found.", file=sys.stderr)
return False
def set_automatic_resolution(self):
@@ -214,7 +216,7 @@ cdef class CoverComplex:
if os.path.isfile(color_file_name):
self.thisptr.set_color_from_file(str.encode(color_file_name))
else:
- print("file " + color_file_name + " not found.")
+ print("file " + color_file_name + " not found.", file=sys.stderr)
def set_color_from_range(self, color):
"""Computes the function used to color the nodes of the simplicial
@@ -235,7 +237,7 @@ cdef class CoverComplex:
if os.path.isfile(cover_file_name):
self.thisptr.set_cover_from_file(str.encode(cover_file_name))
else:
- print("file " + cover_file_name + " not found.")
+ print("file " + cover_file_name + " not found.", file=sys.stderr)
def set_cover_from_function(self):
"""Creates a cover C from the preimages of the function f.
@@ -268,7 +270,7 @@ cdef class CoverComplex:
if os.path.isfile(func_file_name):
self.thisptr.set_function_from_file(str.encode(func_file_name))
else:
- print("file " + func_file_name + " not found.")
+ print("file " + func_file_name + " not found.", file=sys.stderr)
def set_function_from_range(self, function):
"""Creates the function f from a vector stored in memory.
@@ -309,7 +311,7 @@ cdef class CoverComplex:
if os.path.isfile(graph_file_name):
self.thisptr.set_graph_from_file(str.encode(graph_file_name))
else:
- print("file " + graph_file_name + " not found.")
+ print("file " + graph_file_name + " not found.", file=sys.stderr)
def set_graph_from_OFF(self):
"""Creates a graph G from the triangulation given by the input OFF