Beispiel #1
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 #2
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 #3
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 #4
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 #5
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 #6
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 #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.
        """

        logging.debug(
            'egads - text_file_io.py - EgadsFile - __init__ - filename ' +
            str(filename) + ', perms' + str(perms))
        FileCore.__init__(self, filename, perms, pos=0)
Beispiel #8
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)