Did I find the right examples for you? yes no

All Samples(12)  |  Call(11)  |  Derive(0)  |  Import(1)

        def _complain_ifclosed(closed):
    if closed:
        raise ValueError, "I/O operation on closed file"
        


src/d/j/django-dbstorage-1.3/django_dbstorage/models.py   django-dbstorage(Download)
    from StringIO import StringIO
 
from StringIO import _complain_ifclosed
 
from django.conf import settings
    def next(self):
        _complain_ifclosed(self.closed)
        r = self._file.readline()
        if not r:
            raise StopIteration
    def isatty(self):
        """isatty() -> False."""
        _complain_ifclosed(self.closed)
        return False
 
        the end of a file).
        """
        _complain_ifclosed(self.closed)
        return self._file.seek(offset, whence)
 
    def tell(self):
        """
        tell() -> current file position, an integer (may be a long integer).
        """
        _complain_ifclosed(self.closed)