Miscellaneous functions related to ASCII and pickled-binary file I/O.
The CSV delimiter (defaults to any whitespace)
Encoding ID for CSV-formatted text data.
Encoding ID for free-formatted text data (used for output).
Encoding ID for pickled data.
The set of all input encodings.
Return the first object in a file.
Read all objects in a set of files.
| Parameters: |
|
|---|---|
| Returns: | Iterator over the set of all objects read. |
Load data from a file.
If the filename ends in ”.py”, then this function treats the file as python source. Otherwise, the file is treated as a pickled data object.
| Parameters: |
|
|---|
Load a file of Python source as a dictionary.
| Parameters: | fname (str) – Path to file from which to read script. |
|---|---|
| Returns: | All global variables set by the script. |
| Return type: | dict |
The set of all output encodings.
Read a file in GTiff format as an array.
| Parameters: | fname (str) – Path to input file. |
|---|---|
| Return type: | 3D ndarray |
Returns lines of file as an array.
Read CSV data from a file.
Deprecated since version 0.1: Use numpy.loadtxt() instead.
Store a single object to a file.
Evaluate a function, ignoring the data written to stdout.
This works even if the code emitting data to stdout is in a compiled extension.
| Parameters: |
|
|---|---|
| Returns: | Value returned by callback function. |
Write an array as lines of a file.
Any existing file data is destroyed.
Write CSV data to a file.
Deprecated since version 0.1: Use numpy.savetxt() instead.
Write a string to a file.
Any existing file data is destroyed.