def __init__(self, fname, mode='r'):
        """ Constructor. Opens the specified file.

        :param fname: Filename to open.
        :param mode: File open mode (r, r+, w, w-, x, a).
        """
        self.global_key = "UniqueGlobalKey/"
        if mode not in supported_modes:
            raise IOError("Unsupported file handle mode : '{}' {}".format(mode, mode_docstring))
        self.filename = fname
        self.handle = None
        self._is_open = False
        self.mode = mode
        self._initialise_file()
def __init__ ( self , fname , mode = 'r' ) : self . global_key = "UniqueGlobalKey/" if mode not in supported_modes : raise IOError ( "Unsupported file handle mode : '{}' {}" . format ( mode , mode_docstring ) ) self . filename = fname self . handle = None self . _is_open = False self . mode = mode self . _initialise_file ( )
Constructor. Opens the specified file.

        :param fname: Filename to open.
        :param mode: File open mode (r, r+, w, w-, x, a).