astropy/astropy — pull request #372 by eteq (2012-09-06 05:41:37+00:00)
Title: adding Table.psave method

Note that this is *not* ready for merging immediately - it needs tests/docs/polish before merging/

The main thing this does is add a `psave` method to `astropy.table.Table`. This just generates text as the `pformat` and `pprint` functions do, and saves it to a file instead of the terminal.

The main question is whether or not this method should exist at all - @taldcroft and @astrofrog, in particular, may have some thoughts on this. This seems reasonable to me because it's simple enough to implement that I've already found myself doing it by hand semi-regularly, so a convinience method might make sense here. On the other hand, in principal that's what `Table.write` and the I/O framework for `table` is for, so this sort of duplicates some efforts.

Should I go ahead and flesh this out more, or do we not want such a thing in `astropy.table` right now?