carputils.carpio.txt
.TxtFilecarputils.carpio.txt.
TxtFile
(filename, mode='r')file IO class for reading ascii files with extensions - dat(.gz) - elem - vec(.gz) - vtx - pts
Direct read/write to gzipped files is possible. The class automatically determines if the file is gzipped by its extension.
This class is little more than an elaborate wrapper for the numpy loadtxt
and savetxt functions, but is included for completeness in the
carputils.carpio
module.
close
()Close the file object.
data
()Return a numpy array of the file contents.
write
(data, **kwargs)Write a numpy array to a .dat or .vec file.