Files
old-nlp/venv/lib/python3.7/site-packages/nltk/__pycache__/internals.cpython-37.pyc

424 lines
28 KiB
Plaintext
Raw Normal View History

2019-10-20 13:16:49 +02:00
B
D(<28><00>@s<>ddlmZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddl Z yddl m ZWn ek
r<EFBFBD>ddl mZYnXddlmZddlmZdagadAdd <09>ZdBd d <0C>ZGd d<0E>de<18>Ze<05>d<0F>Zdd<11>Ze<05>d<12>Zdd<14>Ze<05>d<15>Zdd<17>Z dd<19>Z!dd<1B>Z"dd<1D>Z#dd<1F>Z$Gd d!<21>d!e%<25>Z&Gd"d#<23>d#<23>Z'dCd%d&<26>Z(dDd'd(<28>Z)dEd)d*<2A>Z*dFd+d,<2C>Z+dGd-d.<2E>Z,dHd/d0<64>Z-dId1d2<64>Z.d3d4<64>Z/d5d6<64>Z0d7d8<64>Z1ej2Gd9d:<3A>d:e%<25><03>Z3dJd;d<<3C>Z4d=d><3E>Z5d?d@<40>Z6dS)K<>)<01>print_functionN)<01> cElementTree)<01> ElementTree)<01> string_types)<01>compatFcCs>td|ddg|dgd<05>a|dk r:t|t<03>r2|<01><04>}t|<01>adS)a<>
Configure nltk's java interface, by letting nltk know where it can
find the Java binary, and what extra options (if any) should be
passed to Java when it is run.
:param bin: The full path to the Java binary. If not specified,
then nltk will search the system for a Java binary; and if
one is not found, it will raise a ``LookupError`` exception.
:type bin: str
:param options: A list of options that should be passed to the
Java binary when it is called. A common value is
``'-Xmx512m'``, which tells Java binary to increase
the maximum heap size to 512 megabytes. If no options are
specified, then do not modify the options list.
:type options: list(str)
<20>javaZJAVAHOMEZ JAVA_HOMEzjava.exe)<03>env_vars<72>verbose<73> binary_namesN)<07> find_binary<72> _java_bin<69>
isinstancer<00>split<69>list<73> _java_options)<03>bin<69>optionsr <00>r<00>0/tmp/pip-install-4m6m_5d_/nltk/nltk/internals.py<70> config_java's

rTc Cs<>tjtjtjd<01>}|<06>||<02>}|<06>||<03>}|<06>||<04>}t|t<06>rHtd<02><01>tdkrVt <09>t|t<06>rh|g}nt
|<01>}t j j <0A>|<07>}t
|<00>}d|g|}tgt|}tj||||d<05>}|s<>|S|<08><11>\}}|jdkr<>tt|<04><01>tdt|<00><00><01>||fS)a<>
Execute the given java command, by opening a subprocess that calls
Java. If java has not yet been configured, it will be configured
by calling ``config_java()`` with no arguments.
:param cmd: The java command that should be called, formatted as
a list of strings. Typically, the first string will be the name
of the java class; and the remaining strings will be arguments
for that java class.
:type cmd: list(str)
:param classpath: A ``':'`` separated list of directories, JAR
archives, and ZIP archives to search for class files.
:type classpath: str
:param stdin, stdout, stderr: Specify the executed programs'
standard input, standard output and standard error file
handles, respectively. Valid values are ``subprocess.PIPE``,
an existing file descriptor (a positive integer), an existing
file object, 'pipe', 'stdout', 'devnull' and None. ``subprocess.PIPE`` indicates that a
new pipe to the child should be created. With None, no
redirection will occur; the child's file handles will be
inherited from the parent. Additionally, stderr can be
``subprocess.STDOUT``, which indicates that the stderr data
from the applications should be captured into the same file
handle as for stdout.
:param blocking: If ``false``, then return immediately after
spawning the subprocess. In this case, the return value is
the ``Popen`` object, and not a ``(stdout, stderr)`` tuple.
:return: If ``blocking=True``, then return a tuple ``(stdout,
stderr)``, containing the stdout and stderr outputs generated
by the java command if the ``stdout`` and ``stderr`` parameters
were set to ``subprocess.PIPE``; or None otherwise. If
``blocking=False``, then return a ``subprocess.Popen`` object.
:raise OSError: If the java command returns a nonzero return code.
)<03>pipe<70>stdout<75>devnullzcmd should be a list of stringsNz-cp)<03>stdinr<00>stderrrzJava command failed : )<17>
subprocess<EFBFBD>PIPE<50>STDOUT<55>DEVNULL<4C>getr r<00> TypeErrorr rr<00>os<6F>path<74>pathsep<65>joinr<00>Popen<65> communicate<74>
returncode<EFBFBD>print<6E>_decode_stdoutdata<74>OSError<6F>str) <09>cmd<6D> classpathrrr<00>blockingZsubprocess_output_dict<63>
classpaths<EFBFBD>prrrrGs.)   

  
 rc@s eZdZdZdd<03>Zdd<05>ZdS)<07> ReadErrorz<72>
Exception raised by read_* functions when they fail.
:param position: The index in the input string where an error occurred.
:param expected: What was expected when an error occurred.
cCst<00>|||<02>||_||_dS)N)<04>
ValueError<EFBFBD>__init__<5F>expected<65>position)<03>selfr4r5rrrr3<00>szReadError.__init__cCsd|j|jfS)NzExpected %s at %s)r4r5)r6rrr<00>__str__<5F>szReadError.__str__N)<06>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r3r7rrrrr1<00>sr1z[uU]?[rR]?(\"\"\"|\'\'\'|\"|\')c
Cs<>t<00>||<01>}|std|<01><02>|<02>d<02>}t<04>d|<00>}|<02><06>}x<|<04>||<05>}|sVtd|<05><02>|<06>d<05>dkrr|<06><06>d}q<Pq<Wyt|||<06><06><00><00>|<06><06>fSt k
r<EFBFBD>}ztd|<00><01>Wdd}~XYnXdS) a<>
If a Python string literal begins at the specified position in the
given string, then return a tuple ``(val, end_position)``
containing the value of the string literal and the position where
it ends. Otherwise, raise a ``ReadError``.
:param s: A string that will be checked to see if within which a
Python string literal exists.
:type s: str
:param start_position: The specified beginning position of the string ``s``
to begin regex matching.
:type start_position: int
:return: A tuple containing the matched string literal evaluated as a
string and the end position of the string literal.
:rtype: tuple(str, int)
:raise ReadError: If the ``_STRING_START_RE`` regex doesn't return a
match in ``s`` at ``start_position``, i.e., open quote. If the
``_STRING_END_RE`` regex doesn't return a match in ``s`` at the
end of the first match, i.e., close quote.
:raise ValueError: If an invalid string (i.e., contains an invalid
escape sequence) is passed into the ``eval``.
:Example:
>>> from nltk.internals import read_str
>>> read_str('"Hello", World!', 0)
('Hello', 7)
z
open quote<74>z\\|%sz close quoter<00>\zinvalid string (%s)N)
<EFBFBD>_STRING_START_RE<52>matchr1<00>group<75>re<72>compile<6C>end<6E>search<63>evalr2)<08>s<>start_position<6F>mZ quotemarkZ_STRING_END_REr5r?<00>errr<00>read_str<74>s"! 

 
rJz-?\d+cCs.t<00>||<01>}|std|<01><02>t|<02><04><00>|<02><05>fS)ak
If an integer begins at the specified position in the given
string, then return a tuple ``(val, end_position)`` containing the
value of the integer and the position where it ends. Otherwise,
raise a ``ReadError``.
:param s: A string that will be checked to see if within which a
Python integer exists.
:type s: str
:param start_position: The specified beginning position of the string ``s``
to begin regex matching.
:type start_position: int
:return: A tuple containing the matched integer casted to an int,
and the end position of the int in ``s``.
:rtype: tuple(int, int)
:raise ReadError: If the ``_READ_INT_RE`` regex doesn't return a
match in ``s`` at ``start_position``.
:Example:
>>> from nltk.internals import read_int
>>> read_int('42 is the answer', 0)
(42, 2)
<20>integer)<06> _READ_INT_REr?r1<00>intr@rC)rFrGrHrrr<00>read_ints 
rNz-?(\d*)([.]?\d*)?cCsdt<00>||<01>}|r$|<02>d<01>s.|<02>d<02>s.td|<01><02>|<02>d<02>rLt|<02><02><00>|<02><05>fSt|<02><02><00>|<02><05>fSdS)a<>
If an integer or float begins at the specified position in the
given string, then return a tuple ``(val, end_position)``
containing the value of the number and the position where it ends.
Otherwise, raise a ``ReadError``.
:param s: A string that will be checked to see if within which a
Python number exists.
:type s: str
:param start_position: The specified beginning position of the string ``s``
to begin regex matching.
:type start_position: int
:return: A tuple containing the matched number casted to a ``float``,
and the end position of the number in ``s``.
:rtype: tuple(float, int)
:raise ReadError: If the ``_READ_NUMBER_VALUE`` regex doesn't return a
match in ``s`` at ``start_position``.
:Example:
>>> from nltk.internals import read_number
>>> read_number('Pi is 3.14159', 6)
(3.14159, 13)
r<<00><00>numberN)<07>_READ_NUMBER_VALUEr?r@r1<00>floatrCrM)rFrGrHrrr<00> read_number&s  

rScsTt|tj<02>rHt<03>|<00>dk rH|j<05><00>fdd<03>tt<03>|<00><01>D<00>}t|<01>dkStd<05><01>dS)a<>
:return: True if ``method`` overrides some method with the same
name in a base class. This is typically used when defining
abstract base classes or interfaces, to allow subclasses to define
either of two related methods:
>>> class EaterI:
... '''Subclass must define eat() or batch_eat().'''
... def eat(self, food):
... if overridden(self.batch_eat):
... return self.batch_eat([food])[0]
... else:
... raise NotImplementedError()
... def batch_eat(self, foods):
... return [self.eat(food) for food in foods]
:type method: instance method
Ncs g|]}<01>|jkr|j<00><00>qSr)<01>__dict__)<02>.0<EFBFBD>cls)<01>namerr<00>
<listcomp>gszoverridden.<locals>.<listcomp>r<zExpected an instance method.) r <00>types<65>
MethodTyperZ get_im_classr8<00>_mro<72>lenr )<02>method<6F>funcsr)rWr<00>
overriddenPs 
 r_cCs<t|t<01>r|jS|g}x|jD]}|<01>t|<02><01>qW|SdS)aY
Return the method resolution order for ``cls`` -- i.e., a list
containing ``cls`` and all its base classes, in the order in which
they would be checked by ``getattr``. For new-style classes, this
is just cls.__mro__. For classic classes, this can be obtained by
a depth-first left-to-right traversal of ``__bases__``.
N)r <00>type<70>__mro__<5F> __bases__<5F>extendr[)rV<00>mro<72>baserrrr[ps 
 r[cCsjd}|jr:|j<00><01>d|_t<02>d|j<00><04><00>}|r@t|<04>}nd|_|jtjd||f||dd<06>7_dS)z4Add an epytext @field to a given object's docstring.<2E>z
z(?<=\n)[ ]+(?!\s)z@%s: %sz )<02>initial_indent<6E>subsequent_indentN)r;<00>rstriprA<00>findall<6C>
expandtabs<EFBFBD>min<69>textwrap<61>fill)<05>obj<62>field<6C>message<67>indent<6E>indentsrrr<00>_add_epytext_field<6C>s


rtcs<00>fdd<02>}|S)a$
A decorator used to mark functions as deprecated. This will cause
a warning to be printed the when the function is used. Usage:
>>> from nltk.internals import deprecated
>>> @deprecated('Use foo() instead')
... def bar(x):
... print(x/10)
csdd<01>j<00>f<00>dtj<02>ddd<04><00><01><00>fdd<06>}|j<03><04>j<03><00>j|_<00>j|_d|_t|d<08><02>|S) Nz&Function %s() has been deprecated. %s<>
z )rgrhcstj<01>tdd<02><00>||<01>S)NrO)<02>category<72>
stacklevel)<03>warnings<67>warn<72>DeprecationWarning)<02>args<67>kwargs)<02>func<6E>msgrr<00>newFunc<6E>sz.deprecated.<locals>.decorator.<locals>.newFuncT<63>
deprecated)r8rmrnrT<00>updater;Z__deprecated__rt)r}r)rq)r}r~r<00> decorator<6F>s zdeprecated.<locals>.decoratorr)rqr<>r)rqrr<><00>s r<>c@seZdZdZdd<03>ZdS)<05>
Deprecateda<EFBFBD>
A base class used to mark deprecated classes. A typical usage is to
alert users that the name of a class has changed:
>>> from nltk.internals import Deprecated
>>> class NewClassName(object):
... pass # All logic goes here.
...
>>> class OldClassName(Deprecated, NewClassName):
... "Use NewClassName instead."
The docstring of the deprecated class will be used in the
deprecation warning message.
cOs<>d}x t|<00>D]}t|jkr|}PqW|s2td<01><01>|jp>d<02><05>}t<06>dd|<05>}t<06>dd|<05>}d|j}||kr||d|j7}d||f}dt j
|d d d
<EFBFBD>}t j |t d d <0C>t<0E>|<00>S) Nz-Unable to determine which base is deprecated.rfz\A\s*@deprecated:z(?m)^\s*zClass %sz (base class for %s)z%s has been deprecated. %sruz )rgrhrO)rvrw)r[r<>rb<00>AssertionErrorr;<00>striprA<00>subr8rmrnrxryrz<00>object<63>__new__)rVr{r|Zdep_clsre<00>docrWr~rrrr<><00>s 
 
 zDeprecated.__new__N)r8r9r:r;r<>rrrrr<><00>sr<>c@s"eZdZdZddd<04>Zdd<06>ZdS) <09>CounterzE
A counter that auto-increments each time its value is read.
rcCs
||_dS)N)<01>_value)r6<00> initial_valuerrrr3<00>szCounter.__init__cCs|jd7_|jS)Nr<)r<>)r6rrrr<00>sz Counter.getN)r)r8r9r:r;r3rrrrrr<><00>s
r<>rc cs||g|p
g}t|t<01>st<02>t|t<01>r*t<02>t|t<01>r8t<02>t|t<01>rJ|<01><03>}d}x<>|D]<5D>}tj<05>||<08>} tj<05>| <09>r<>|r<>td|| f<00>d}| Vtj<05>|<08>r<>|r<>td||f<00>d}|Vtj<05>|d|<08>} tj<05>| <09>rT|r<>td|| f<00>d}| VqTW<00>x|D]<5D>}
|
tj k<06>r|<06>r&d}tj |
Vx<>tj |
<00>tj
<EFBFBD>D]<5D>} tj<05>| <0B><01>rl|<05>rbtd|| f<00>d}| Vx<>|D]<5D>}tj<05>| |<08>} tj<05>| <09><01>r<>|<05>r<>td|| f<00>d}| Vtj<05>| d|<08>} tj<05>| <09><01>rr|<05>r<>td|| f<00>d}| V<00>qrW<00>q:W<00>qWxD|D]<} x4|D],}tj<05>| |<08>} tj<05>| <09><01>rd}| V<00>qW<00>qWtj dk<02>r<>x<EFBFBD>|D]<5D>}z<>ynt j d|gt jt jd<08>} | <0A><0F>\}}t|<0E><01><11>}|<10>|<08><01>r<>tj<05>|<10><01>r<>|<05>r<>td||f<00>d}|VWntttfk
<EFBFBD>r<><00>YnXWd X<00>qZW|<07>sxd
|}|<01>r|d |d 7}|d 7}|<02>rL|d7}|d<0F>dd<11>|D<00><01>7}|<04>rb|d||f7}d}td|||f<00><01>d S)a<>
Search for a file to be used by nltk.
:param filename: The name or path of the file.
:param env_vars: A list of environment variable names to check.
:param file_names: A list of alternative file names to check.
:param searchpath: List of directories to search.
:param url: URL presented to user for download help.
:param verbose: Whether or not to print path when a file is found.
Fz[Found %s: %s]T<>filer<00>posix<69>which)rrNzSNLTK was unable to find the %s file!
Use software specific configuration paramatersz# or set the %s environment variabler<00>.z
Searched in:rfcss|]}d|VqdS)z
- %sNr)rU<00>drrr<00> <genexpr>{sz!find_file_iter.<locals>.<genexpr>z-
For more information on %s, see:
<%s>zK===========================================================================z
%s
%s
%s)r rr<>rr!r"r$<00>isfiler(<00>environr#rWrr%rr&r)r<><00>endswith<74>exists<74>KeyboardInterrupt<70>
SystemExitr*<00> LookupError)<13>filenamer<00>
searchpath<EFBFBD>
file_names<EFBFBD>urlr <00> finding_dir<69>yielded<65> alternativeZ path_to_file<6C>env_varZenv_dir<69> directoryr0rrr"r~<00>divrrr<00>find_file_iter<65>s<>

   
   


 

  
 r<>cCstt||||||<05><06>S)N)<02>nextr<74>)r<>rr<>r<>r<>r rrr<00> find_file<6C>sr<>c
Cstt||||||dd<02><07>S)NT)r<>)r<>r<>)r<>rr<>r<>r<>r rrr<00>find_dir<69>sr<>ccs*x$t|p
||||||<06>D]
}|VqWdS)a<>
Search for a file to be used by nltk.
:param name: The name or path of the file.
:param path_to_bin: The user-supplied binary location (deprecated)
:param env_vars: A list of environment variable names to check.
:param file_names: A list of alternative file names to check.
:param searchpath: List of directories to search.
:param url: URL presented to user for download help.
:param verbose: Whether or not to print path when a file is found.
N)r<>)rW<00> path_to_binrr<>r
r<>r r<>rrr<00>find_binary_iter<65>sr<>c Cstt|||||||<06><07>S)N)r<>r<>)rWr<>rr<>r
r<>r rrrr <00>s r c
#s<>t|t<01>st<02>t|t<01>rt<02>t|t<01>r.|<02><03>}d}dgt|<02>}|dk rptj<06>|<01>r`d}|Vntd||f<00><01><01>x<>|D<00>]<5D>}|tj krx|dk<02>r<>tj d} <09>x<>| <09>tjj
<EFBFBD>D<00>] }
tj<06>|
<EFBFBD><01>rtj<06> |
<EFBFBD>} |r<>t <0C> || <0B>s<>|<06>s| |k<02>r|<05>rtd||
f<00>d}|
Vtj<06>|
<EFBFBD>r<>|<06>sdtj<06>tj<06>|
|<00><02><01>r<>|<05>rNtd||
f<00>d}tj<06>|
|<00>Vq<>xVt<05>|
<EFBFBD>D]H} t <0C> || <0C><02>rp|<05>r<>td|tj<06>|
| <0C>f<00>d}tj<06>|
| <0C>V<00>qpWq<>Wqxtj |<00>tj<06><0F><00><01>r<><72>fdd<08>t<05><11><00>D<00>n<04>f} xl| D]d}tj<06>|<01><01>r<>tj<06> |<01>} |<06>r0t <0C> || <0B><02>s@|<06>s<>| |k<02>r<>|<05>rVtd||f<00>d}|V<00>q<>WqxWx<>|D]<5D>}|<06>r<>x<EFBFBD>t<05>|<0E>D]P} tj<06>|| <0B>}tj<06>|<01><01>r<>t <0C> || <0B><02>r<>|<05>r<>td| |f<00>d}|V<00>q<>Wn<tj<06>||<00>}tj<06>|<01><01>rp|<05>rtd||f<00>d}|V<00>qpW|<07>s<>d |}|<02>rB|d
|d 7}tj|d d d d<0E>}|<03>r||d7}|d<10>dd<08>|D<00><01>7}|<04>r<>|d||f7}d}td|||f<00><01>dS)a<>
Search for a jar that is used by nltk.
:param name_pattern: The name of the jar file
:param path_to_jar: The user-supplied jar location, or None.
:param env_vars: A list of environment variable names to check
in addition to the CLASSPATH variable which is
checked by default.
:param searchpath: List of directories to search.
:param is_regex: Whether name is a regular expression.
FZ CLASSPATHNTz Could not find %s jar file at %sz[Found %s: %s]c3s|]}tj<01><02>|<01>VqdS)N)r!r"r$)rU<00> path_to_jar)<01>jar_envrrr<>sz find_jar_iter.<locals>.<genexpr>zNLTK was unable to find %s!z Set the %s environment variablerr<>z )rgrhz
Searched in:rfcss|]}d|VqdS)z
- %sNr)rUr<>rrrr<>Asz.
For more information, on %s, see:
<%s>zK===========================================================================z
%s
%s
%s)r rr<>rrr!r"r<>r<>r<>r#<00>basenamerAr?r(<00>isdirr$<00>listdirrmrn)<11> name_patternr<6E>rr<>r<>r <00>is_regexr<78>r<>r-<00>cpr<70><00> file_nameZjar_iterr<72>r~r<>r)r<>r<00> find_jar_iter<65>s<>
 


   
&
 
 
r<>c Cstt|||||||<06><07>S)N)r<>r<>)r<>r<>rr<>r<>r r<>rrr<00>find_jarKs r<>cCsdd<02>t<00>|<00>D<00>S)NcSs2g|]*\}}}t<00>|d<00>D]}tj<03>||<04><02>qqS)z*.jar)<05>fnmatch<63>filterr!r"r$)rU<00>root<6F>dirnames<65> filenamesr<73>rrrrX]sz)find_jars_within_path.<locals>.<listcomp>)r!<00>walk)Z path_to_jarsrrr<00>find_jars_within_path[sr<>cCs:t|t<01>s|Sttjdt<05><06><00>}|dkr0|<00><07>S|<00>|<01>S)z1 Convert data read from stdout/stderr to unicode <20>encodingN)r <00>bytes<65>getattr<74>sys<79>
__stdout__<EFBFBD>locale<6C>getpreferredencoding<6E>decode)Z
stdoutdatar<EFBFBD>rrrr)cs 
r)cCs*tj}dd<02>tjD<00>t_t|<00>}|t_|S)a<>
When python is run from within the nltk/ directory tree, the
current directory is included at the beginning of the search path.
Unfortunately, that means that modules within nltk can sometimes
shadow standard library modules. As an example, the stdlib
'inspect' module will attempt to import the stdlib 'tokenize'
module, but will instead end up importing NLTK's 'tokenize' module
instead (causing the import to fail).
cSsg|]}|dkr|<01>qS))rfr<>r)rUr<>rrrrX~sz&import_from_stdlib.<locals>.<listcomp>)r<>r"<00>
__import__)<03>module<6C>old_pathrHrrr<00>import_from_stdlibss
r<>c@s<>eZdZdZdd<03>Zdd<05>Zdd<07>Zdd <09>Zd
d <0B>Zd d <0A>Z dd<0F>Z
dd<11>Z dd<13>Z dd<15>Z dd<17>Zdd<19>Zdd<1B>Zdd<1D>Zdd<1F>Zd d!<21>Zd+d#d$<24>Zd%d&<26>Zd'd(<28>Zd)d*<2A>Zd"S),<2C>ElementWrappera<72>
A wrapper around ElementTree Element objects whose main purpose is
to provide nicer __repr__ and __str__ methods. In addition, any
of the wrapped Element's methods that return other Element objects
are overridden to wrap those values before returning them.
This makes Elements more convenient to work with in
interactive sessions and doctests, at the expense of some
efficiency.
cCst|t<01>r|St<02>t<01>SdS)z<>
Create and return a wrapper around a given Element object.
If ``etree`` is an ``ElementWrapper``, then ``etree`` is
returned as-is.
N)r r<>r<>r<>)rV<00>etreerrrr<><00>s
zElementWrapper.__new__cCs"t|t<01>rt<02>|<01>}||jd<dS)a?
Initialize a new Element wrapper for ``etree``.
If ``etree`` is a string, then it will be converted to an
Element object using ``ElementTree.fromstring()`` first:
>>> ElementWrapper("<test></test>")
<Element "<?xml version='1.0' encoding='utf8'?>\n<test />">
<20>_etreeN)r rr<00>
fromstringrT)r6r<>rrrr3<00>s

zElementWrapper.__init__cCs|jS)zD
Return the Element object wrapped by this wrapper.
)r<>)r6rrr<00>unwrap<61>szElementWrapper.unwrapcCsdtj|jdd<02><02>d<01>}t|<01>dkr\|<01>d<04>}t|<01>|dkr@d}d|dd<05>||d<00>f}d|S) N<>utf8)r<><00><<00><<3C>i<><69><EFBFBD><EFBFBD>z%s...%sz <Element %r>)r<00>tostringr<67>r<>r\<00>rfind)r6rFrIrrr<00>__repr__<5F>s 
zElementWrapper.__repr__cCstj|jdd<02><02>d<01><01><04>S)zs
:return: the result of applying ``ElementTree.tostring()`` to
the wrapped Element object.
r<>)r<>)rr<>r<>r<>ri)r6rrrr7<00>szElementWrapper.__str__cCs t|j|<01>S)N)r<>r<>)r6<00>attribrrr<00> __getattr__<5F>szElementWrapper.__getattr__cCst|j||<02>S)N)<02>setattrr<72>)r6<00>attr<74>valuerrr<00> __setattr__<5F>szElementWrapper.__setattr__cCs t|j|<01>S)N)<02>delattrr<72>)r6r<>rrr<00> __delattr__<5F>szElementWrapper.__delattr__cCs||j|<dS)N)r<>)r6<00>index<65>elementrrr<00> __setitem__<5F>szElementWrapper.__setitem__cCs |j|=dS)N)r<>)r6r<>rrr<00> __delitem__<5F>szElementWrapper.__delitem__cCs||j||<02><dS)N)r<>)r6<00>start<72>stop<6F>elementsrrr<00> __setslice__<5F>szElementWrapper.__setslice__cCs|j||<02>=dS)N)r<>)r6r<>r<>rrr<00> __delslice__<5F>szElementWrapper.__delslice__cCs
t|j<01>S)N)r\r<>)r6rrr<00>__len__<5F>szElementWrapper.__len__cCst|j|<00>S)N)r<>r<>)r6r<>rrr<00> __getitem__<5F>szElementWrapper.__getitem__cCsdd<02>|j||<02>D<00>S)NcSsg|] }t|<01><01>qSr)r<>)rU<00>eltrrrrX<00>sz/ElementWrapper.__getslice__.<locals>.<listcomp>)r<>)r6r<>r<>rrr<00> __getslice__<5F>szElementWrapper.__getslice__cCsdd<02>|jD<00>S)NcSsg|] }t|<01><01>qSr)r<>)rUr<>rrrrX<00>sz.ElementWrapper.getchildren.<locals>.<listcomp>)r<>)r6rrr<00> getchildren<65>szElementWrapper.getchildrenNcCsdd<02>|j<00>|<01>D<00>S)Ncss|]}t|<01>VqdS)N)r<>)rUr<>rrrr<><00>sz-ElementWrapper.getiterator.<locals>.<genexpr>)r<><00> getiterator)r6<00>tagrrrr<><00>szElementWrapper.getiteratorcCst|j<01>||<02><02>S)N)r<>r<><00> makeelement)r6r<>r<>rrrr<><00>szElementWrapper.makeelementcCs$|j<00>|<01>}|dkr|St|<02>SdS)N)r<><00>findr<64>)r6r"r<>rrrr<><00>s zElementWrapper.findcCsdd<02>|j<00>|<01>D<00>S)NcSsg|] }t|<01><01>qSr)r<>)rUr<>rrrrXsz*ElementWrapper.findall.<locals>.<listcomp>)r<>rj)r6r"rrrrjszElementWrapper.findall)N)r8r9r:r;r<>r3r<>r<>r7r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rjrrrrr<><00>s*  
  
r<>cCs|j|j}}|r`|j}|dkr$d}|dkrBt|t||<03><02>\}}nt|t||<04><02>\}}|||fS|jdkrztd|jj<00><01>|dkr<>d}|dkr<>t|<00>}|dkr<>t dt|<00>|<00>}|dkr<>t dt|<00>|<00>}|dk<04>ry||dWnt
k
<EFBFBD>rt|<00>}YnXt ||<04>}||fS)a
Given a slice, return the corresponding (start, stop) bounds,
taking into account None indices and negative indices. The
following guarantees are made for the returned start and stop values:
- 0 <= start <= len(sequence)
- 0 <= stop <= len(sequence)
- start <= stop
:raise ValueError: If ``slice_obj.step`` is not None.
:param allow_step: If true, then the slice object may have a
non-None step. If it does, then return a tuple
(start, stop, step).
Nr<r)Nr<z)slices with steps are not supported by %s) r<>r<><00>step<65> slice_bounds<64>slicer2<00> __class__r8r\<00>max<61>
IndexErrorrl)<06>sequenceZ slice_objZ
allow_stepr<EFBFBD>r<>r<>rrrr<> s6



r<>cCs<>tj<01>|<00>sdSttd<02>r~t<00>|<00>}t<04>|j<06>}|d@r<dS|jt<00><08>krV|d@rVdS|j t<00>
<EFBFBD>gt<00> <0B>krz|d@rzdSdSdS)NF<4E>getuidrOT<><54><00>) r!r"r<><00>hasattr<74>stat<61>S_IMODE<44>st_mode<64>st_uidr<64><00>st_gid<69>getgid<69> getgroups)r"ZstatdataZpermrrr<00> is_writableSs 

  rcCs"tdt|<01>j|t|<02>jf<00><01>dS)Nzunorderable types: %s() %s %s())r r`r8)Zordering<6E>a<>brrr<00>raise_unorderable_typesssr)NNF)NNNNT)rrNNFF)rrNNF)rrNNF)NrrNNF)NrrNNF)NrrNFF)NrrNFF)F)7<>
__future__rrr!r<>rArxrmrYr<>r<>r<>Z xml.etreerr<00> ImportError<6F>sixrZnltkrr rrrr2r1rBr>rJrLrNrQrSr_r[rtr<>r<>r<>r<>r<>r<>r<>r<>r r<>r<>r<>r)r<><00>python_2_unicode_compatibler<65>r<>rrrrrr<00><module> s<>   
j
:
"
*  1
}




 

G