Did I find the right examples for you? yes no

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/a/s/astropy-0.3.1/astropy/io/fits/file.py   astropy(Download)
from numpy import memmap as Memmap
from .util import (isreadable, iswritable, isfile, fileobj_open, fileobj_name,
                   fileobj_closed, fileobj_mode, _array_from_file,
                   _array_to_file, _write_string, encode_ascii)
        if self.memmap:
            if not isfile(self.__file):
                self.memmap = False
            elif not self.readonly and not self._test_mmap():
                    "file (%s)." % (mode, fmode))
            self.__file = fileobj
        elif isfile(fileobj):
            self.__file = fileobj_open(self.name, PYFITS_MODES[mode])
    return isfile(fileobj) or isinstance(fileobj, gzip.GzipFile)