Beispiel #1
0
    def close(self):
        """
        Close opened file.
        """

        FileCore.close(self)
        self.pos = 0
Beispiel #2
0
    def __init__(self, filename=None, perms='r', delimiter=',', quotechar='"'):
        """
        Initializes instance of EgadsFile object.

        :param string filename:
            Optional - Name of file to open.
        :param char perms:
            Optional - Permissions used to open file. Options are ``w`` for write (overwrites
            data), ``a`` for append ``r+`` for read and write, and ``r`` for read. ``r`` is 
            the default value.
        :param string delimiter:
            Optional - One-character string used to separate fields. Default is ','.
        :param string quotechar:
            Optional - One-character string used to quote fields containing special characters.
            The default is '"'.
        """

        logging.debug(
            'egads - text_file_io.py - EgadsCsv - __init__ - filename ' +
            str(filename) + ', perms ' + str(perms) + ', delimiter ' +
            str(delimiter) + ', quotechar ' + str(quotechar))
        FileCore.__init__(self,
                          filename,
                          perms,
                          reader=None,
                          writer=None,
                          delimiter=delimiter,
                          quotechar=quotechar)
Beispiel #3
0
    def close(self):
        """
        Close opened file.
        """

        FileCore.close(self)
        self.pos = 0
Beispiel #4
0
    def close(self):
        """
        Close opened file.
        """

        logging.debug('egads - text_file_io.py - EgadsFile - close')
        FileCore.close(self)
        self.pos = 0
Beispiel #5
0
    def open(self, filename, perms=None):
        """
        Opens NetCDF file given filename.

        :param string filename:
            Name of NetCDF file to open.
        :param char perms: Optional -
            Permissions used to open file. Options are ``w`` for write (overwrites data in file),
            ``a`` and ``r+`` for append, and ``r`` for read. ``r`` is the default value
        """

        FileCore.open(self, filename, perms)
Beispiel #6
0
    def open(self, filename, perms=None):
        """
        Opens NetCDF file given filename.

        :param string filename:
            Name of NetCDF file to open.
        :param char perms: Optional -
            Permissions used to open file. Options are ``w`` for write (overwrites data in file),
            ``a`` and ``r+`` for append, and ``r`` for read. ``r`` is the default value
        """

        FileCore.open(self, filename, perms)
Beispiel #7
0
    def __init__(self, filename=None, perms='r'):
        """
        Initializes instance of EgadsFile object.

        :param string filename:
            Optional - Name of file to open.
        :param char perms: 
            Optional - Permissions used to open file. Options are ``w`` for write (overwrites
            data), ``a`` for append ``r+`` for read and write, and ``r`` for read. ``r`` is the 
            default value.
        """

        FileCore.__init__(self, filename, perms, pos=0)
Beispiel #8
0
    def __init__(self, filename=None, perms='r'):
        """
        Initializes instance of EgadsFile object.


        :param string filename : string, optional
            Name of file to open.
        :param char perms: Optional -
            Permissions used to open file. Options are ``w`` for write (overwrites
            data), ``a`` for append ``r+`` for read and write, and ``r`` for read. ``r``
            is the default value.
        """

        FileCore.__init__(self, filename, perms, pos=0)
Beispiel #9
0
    def __init__(self, filename=None, perms='r'):
        """
        Initializes NASA Ames instance.

        :param string filename:
            Optional - Name of NetCDF file to open.
        :param char perms:
            Optional -  Permissions used to open file.
            Options are ``w`` for write (overwrites data), ``a`` and ``r+`` for append, 
            and ``r`` for read. ``r`` is the default value.
        """
        
        self.file_metadata = None
        FileCore.__init__(self, filename, perms)
Beispiel #10
0
    def __init__(self, filename=None, perms='r'):
        """
        Initializes NASA Ames instance.

        :param string filename:
            Optional - Name of NetCDF file to open.
        :param char perms:
            Optional -  Permissions used to open file.
            Options are ``w`` for write (overwrites data), ``a`` and ``r+`` for append, 
            and ``r`` for read. ``r`` is the default value.
        """
        
        logging.debug('egads - nasa_ames_io.py - NasaAmes - get_filename - filename ' + str(filename) + ', perms' + str(perms))
        self.file_metadata = None
        FileCore.__init__(self, filename, perms)
Beispiel #11
0
    def __init__(self, filename=None, perms='r'):
        """
        Initializes NASA Ames instance.

        :param string filename:
            Optional - Name of NetCDF file to open.
        :param char perms:
            Optional -  Permissions used to open file.
            Options are ``w`` for write (overwrites data),
            ``a`` and ``r+`` for append, and ``r`` for read. ``r`` is the default
            value.
        """
        self.file_metadata = None

        FileCore.__init__(self, filename, perms)
Beispiel #12
0
    def open(self, filename, perms=None):
        """
        Opens NetCDF file given filename.

        :param string filename:
            Name of NetCDF file to open.
        :param char perms:
            Optional - Permissions used to open file. Options are ``w`` for write 
            (overwrites data in file), ``a`` and ``r+`` for append, and ``r`` for 
            read. ``r`` is the default value
        """

        logging.debug('egads - netcdf_io.py - NetCdf - open - filename ' +
                      str(filename) + ', perms ' + str(perms))
        FileCore.open(self, filename, perms)
Beispiel #13
0
    def __init__(self, filename=None, perms='r'):
        """
        Initializes instance of EgadsFile object.

        :param string filename:
            Optional - Name of file to open.
        :param char perms: 
            Optional - Permissions used to open file. Options are ``w`` for write (overwrites
            data), ``a`` for append ``r+`` for read and write, and ``r`` for read. ``r`` is the 
            default value.
        """

        logging.debug(
            'egads - text_file_io.py - EgadsFile - __init__ - filename ' +
            str(filename) + ', perms' + str(perms))
        FileCore.__init__(self, filename, perms, pos=0)
Beispiel #14
0
    def __init__(self, filename=None, perms='r', delimiter=',', quotechar='"'):
        """
        Initializes instance of EgadsFile object.

        :param string filename: Optional -
            Name of file to open.
        :param char perms: Optional -
            Permissions used to open file. Options are ``w`` for write (overwrites
            data), ``a`` for append ``r+`` for read and write, and ``r`` for read. ``r`` is the default
            value.
        :param string delimiter: Optional -
            One-character string used to separate fields. Default is ','.
        :param string quotechar: Optional -
            One-character string used to quote fields containing special characters.
            The default is '"'.
        """

        FileCore.__init__(self, filename, perms,
                           reader=None,
                           writer=None,
                           delimiter=delimiter,
                           quotechar=quotechar)