RAVE
Lib.rave_tempfile Namespace Reference

Functions

 mktemp (suffix='', close=False)
 RAVE's tempfile constructor.
 

Variables

 tempdir
 Use shared memory space if available, Linux only.
 
 RAVETEMP = tempfile.tempdir
 The redefined template.
 

Detailed Description

Copyright (C) 2010- Swedish Meteorological and Hydrological Institute (SMHI)

This file is part of RAVE.

RAVE is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

RAVE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with RAVE.  If not, see <http://www.gnu.org/licenses/>.

Function Documentation

◆ mktemp()

Lib.rave_tempfile.mktemp ( suffix = '',
close = False )

RAVE's tempfile constructor.

Parameters
suffixstring, can be e.g. '.h5' for HDF5 files
closestring, set to "True" to close the file before continuing. The default value is "False".
Returns
tuple containing an int containing an OS-level handle to an open file as would be returned by os.open(), that can be closed with os.close()., and a string containing the absolute pathname to the file. NOTE the file is created and opened. In order to prevent too many open files, you may have to close this file before continuing.

Variable Documentation

◆ RAVETEMP

Lib.rave_tempfile.RAVETEMP = tempfile.tempdir

The redefined template.

◆ tempdir

Lib.rave_tempfile.tempdir

Use shared memory space if available, Linux only.