Wirawan Purwanto
f49d166a77
* wpylib.iofmt.fortbin: Added fortran_types class to manage and analyze
...
Fortran datatypes.
First edition contains tool to estimate the size of datatypes,
and size of file records (or sequence of records).
12 years ago
Wirawan Purwanto
d70bcf2149
* In text_output methods, do the required action iff self.out is not None.
13 years ago
Wirawan Purwanto
ad841e0b90
* text_input.read_items(): added option `end_line_match' and `last_line_match'
...
(mutually exclusive options) to allow the dataset reading to end upon
encountering certain text pattern (or a more complicated match, if we
specify a function for the option value).
These options can be used to work with the `maxcount' option; the shortest
of the two (maxcount records read first, or end/last_line_match finds a
match) will end the reading of the dataset.
13 years ago
Wirawan Purwanto
606214eb66
* Changing all `isinstance(STUFF, str)' to `isinstance(STUFF, basestring)'
...
for future-proofing this code.
13 years ago
Wirawan Purwanto
6656d3d5e3
* In module text_input: Added head() and tail() to emulate the basic
...
behavior of UNIX commands with the same name.
Output lines are already split into a list of strings.
13 years ago
Wirawan Purwanto
f8a101fbe9
* Added comment_char option for text_input object creation.
...
* Memory leak bugfix: Use instance method weakref.
13 years ago
Wirawan Purwanto
3698671bed
* Added: fortran_bin_file.peek_next_rec_len() to fetch the next record length
...
while not advancing the read pointer to that record yet.
13 years ago
wirawan
81e2ada60c
* Allow comment character to be changed from "#" using the
...
instance.comment_char attribute.
13 years ago
wirawan
c675077620
* Introducing self.lineno counter for line numbers (including the blanks
...
and comment lines).
13 years ago
wirawan
3f3c49df94
* Added file mode for file creation (default: "w").
14 years ago
wirawan
3b522de2d6
* Added text_input.close() method.
14 years ago
wirawan
7d37c0b6ba
* Internal upgrade to factor out reusable parts (for future upgrades).
14 years ago
wirawan
ad73b5af7f
* Added set_next_proc() method to set which procedure should be called when
...
"next()" method dispatcher is called.
This approach should get rid of the problem with circular reference which
causes the text_input instance not be erasable because of strong reference
to `self' in `self.next.im_self'.
14 years ago
wirawan
9e1c6f5868
* Commenting out the verbose printout. I think the module is robust now.
14 years ago
wirawan
90f1603499
* Added text_output as a converse facility to print out text stream to
...
a file.
Useful for a shortened output statements in the code, and also for
reroutable output (to stdout? to file? to both?) and flexible output
kind.
14 years ago
wirawan
96d1f9afd7
* Upgrade to allow reading complex-valued data directly.
...
Please see the documentation of text_input.read_items for more detail.
14 years ago
wirawan
cae9cabdea
* Simple text input reader. Imported from pyqmc.utils.text_input .
14 years ago
wirawan
c87ba9dbfa
* Minor updates.
15 years ago
wirawan
69592e9a8f
* Added writing facility. Still largely untested.
15 years ago
wirawan
15baf746f9
* Ignore all compiled python modules.
15 years ago
wirawan
21e85704aa
* Initial version of Fortran binary file reader.
...
Later a writing facility can be added as well.
* Note that this module is intended only for reading/writing
Fortran-generated files.
It is not recommended for any other purpose because of its terrible feature:
no metadata, no description whatsoever.
15 years ago