A path pointer that identifies a file which can be accessed directly
via a given absolute path. FileSystemPathPointer is a
subclass of str for backwards compatibility purposes -- this
allows old code that expected nltk.data.find() to expect a
string to usually work (assuming the resource is not found in a zipfile).
It also permits open() to work on a FileSystemPathPointer.
|
|
|
|
|
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
|
|
|
|
|
|
string
|
join(self,
fileid)
Return a new path pointer formed by starting at the path identified
by this pointer, and then following the relative path given by
fileid. |
source code
|
|
|
|
|
|
|
|
|
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
|