Changes in python/genericio.py [be75350:9796d0a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/genericio.py
rbe75350 r9796d0a 38 38 # ***************************************************************************** 39 39 40 from __future__ import print_function41 40 import numpy as np 42 41 import ctypes as ct 43 import os ,sys42 import os 44 43 45 44 #Define where the library is and load it … … 73 72 74 73 def gio_read(file_name,var_name): 75 if sys.version_info[0] == 3:76 file_name = bytes(file_name,'ascii')77 var_name = bytes(var_name,'ascii')78 74 var_size = libpygio.get_elem_num(file_name) 79 75 var_type = libpygio.get_variable_type(file_name,var_name) 80 76 field_count = libpygio.get_variable_field_count(file_name,var_name) 81 77 if(var_type==10): 82 print ("Variable not found")78 print "Variable not found" 83 79 return 84 80 elif(var_type==9): 85 print ("variable type not known (not int32/int64/float/double)")81 print "variable type not known (not int32/int64/float/double)" 86 82 elif(var_type==0): 87 83 #float … … 106 102 107 103 def gio_has_variable(file_name,var_name): 108 if sys.version_info[0] == 3:109 file_name=bytes(file_name,'ascii')110 var_name=bytes(var_name,'ascii')111 104 var_size = libpygio.get_elem_num(file_name) 112 105 var_type = libpygio.get_variable_type(file_name,var_name) … … 114 107 115 108 def gio_inspect(file_name): 116 if sys.version_info[0] == 3:117 file_name=bytes(file_name,'ascii')118 109 libpygio.inspect_gio(file_name) 119 110
Note: See TracChangeset
for help on using the changeset viewer.