Package nltk :: Module data :: Class GzipFileSystemPathPointer
[hide private]
[frames] | no frames]

Class GzipFileSystemPathPointer

source code

       object --+        
                |        
      PathPointer --+    
                    |    
   object --+       |    
            |       |    
   basestring --+   |    
                |   |    
              str --+    
                    |    
FileSystemPathPointer --+
                        |
                       GzipFileSystemPathPointer

A subclass of FileSystemPathPointer that identifies a gzip-compressed file located at a given absolute path. GzipFileSystemPathPointer is appropriate for loading large gzip-compressed pickle objects efficiently.

Instance Methods [hide private]
 
open(self, encoding=None)
Return a seekable read-only stream that can be used to read the contents of the file identified by this path pointer.
source code

Inherited from FileSystemPathPointer: __init__, __repr__, __str__, file_size, join

Inherited from str: __add__, __contains__, __eq__, __ge__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __new__, __rmod__, __rmul__, capitalize, center, count, decode, encode, endswith, expandtabs, find, index, isalnum, isalpha, isdigit, islower, isspace, istitle, isupper, ljust, lower, lstrip, partition, replace, rfind, rindex, rjust, rpartition, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

Class Variables [hide private]
  BLOCK_SIZE = 2097152
Properties [hide private]

Inherited from FileSystemPathPointer: path

Inherited from object: __class__

Method Details [hide private]

open(self, encoding=None)

source code 

Return a seekable read-only stream that can be used to read the contents of the file identified by this path pointer.

Raises:
  • IOError - If the path specified by this pointer does not contain a readable file.
Overrides: FileSystemPathPointer.open