[Numpy-discussion] creating or truncating SD files in pyhdf
Robert Kern
robert.kern at gmail.com
Thu Sep 11 17:00:44 EDT 2008
On Thu, Sep 11, 2008 at 15:54, Catherine Moroney
<Catherine.M.Moroney at jpl.nasa.gov> wrote:
> What is the correct way to create an SD file (if it doesn't already
> exist),
> or truncate and then rewrite an existing one?
I would suggest testing with os.path.exists() first, then deciding
whether to use TRUNC or not based on that.
> Does it matter which
> order
> the file-access options are set?
No, the | operator is commutative.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the NumPy-Discussion
mailing list