All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kr.motd.maven.sphinx.dist.jinja2.utils$py.class Maven / Gradle / Ivy

There is a newer version: 2.10.0
Show newest version
????1?f$0R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;__doc__?
    jinja2.utils
    ~~~~~~~~~~~~

    Utility functions.

    :copyright: (c) 2017 by the Jinja Team.
    :license: BSD, see LICENSE for more details.
org/python/core/PyStringfromInterned.(Ljava/lang/String;)Lorg/python/core/PyString;	

org/python/core/PyFrame
	setglobal/(Ljava/lang/String;Lorg/python/core/PyObject;)V
setline(I)V
reorg/python/core/imp	importOneH(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject;
setlocal
 json"errno$collections&java/lang/String(deque*
importFrom\(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject;,-
.	threading0Lock2jinja2._compat4	text_type6string_types8implements_iterator:	url_quote<getname.(Ljava/lang/String;)Lorg/python/core/PyObject;>?
@compileBorg/python/core/PyObjectD__getattr__F?
EG(\s+)I__call__S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;KL
EM_word_split_reO4^(?P(?:%s)*)(?P.*?)(?P(?:%s)*)$Qorg/python/core/PyTupleS|UjoinWmapYescape[(]<_<a([Lorg/python/core/PyObject;)Vcd
Tem(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;Kg
Eh.j,l)n>p
r>t_mod6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject;vw
Ex_punctuation_rez&^\S+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+$|_simple_email_re~(|<[^>]*>)?
_striptags_re?	&([^;]+);?
_entity_re?4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ?_letters?
0123456789?_digits?type?MissingType?org/python/core/Py?EmptyObjectsorg/python/core/PyObject;??	??org/python/core/PyDictionary?__repr__?org/python/core/PyFunction?	f_globalsLorg/python/core/PyObject;??	?f$1missing?f_lastiI??	?jinja2/utils$py?Lorg/python/core/PyCode;??	??P(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Vc?
??
?e?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;K?
E?9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;K?
E?set?
internal_code??org/python/core/PyUnicode?/(Ljava/lang/String;)Lorg/python/core/PyUnicode;	?
??concat?\/?dumps?/?_notin?w
E?
_slash_escape?contextfunction$2+This decorator can be used to mark a function or method context callable.
    A context callable is passed the active :class:`Context` as first argument when
    called from the template.  This is useful if a function wants to get access
    to the context or functions provided on the context object.  For example
    a function that returns a sorted list of template variables the current
    template exports could look like this::

        @contextfunction
        def get_exported_names(context):
            return sorted(context.exported_vars)
    ?True?	getglobal??
?getlocal(I)Lorg/python/core/PyObject;??
?contextfunction?__setattr__?
E???	??j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)Vc?
??evalcontextfunction$3GThis decorator can be used to mark a function or method as an eval
    context callable.  This is similar to the :func:`contextfunction`
    but instead of passing the context, an evaluation context object is
    passed.  For more information about the eval context, see
    :ref:`eval-context`.

    .. versionadded:: 2.4
    ?evalcontextfunction???	??environmentfunction$4?This decorator can be used to mark a function or method as environment
    callable.  This decorator works exactly like the :func:`contextfunction`
    decorator just that the first argument is the active :class:`Environment`
    and not context.
    ?environmentfunction???	??internalcode$5%Marks the function as internally used?add?__code__???	??internalcode?is_undefined$6?Check if the object passed is undefined.  This does nothing more than
    performing an instance check against :class:`Undefined` but looks nicer.
    This can be used for custom filters or tests that want to react to
    undefined variables.  For example a custom default filter can look like
    this::

        def default(var, default=''):
            if is_undefined(var):
                return default
            return var
    jinja2.runtime	Undefined(ILorg/python/core/PyObject;)V
	
isinstance?	?
is_undefined	consume$74Consumes an iterable without doing anything with it.__iter__()Lorg/python/core/PyObject;
E__iternext__
ENone?	??	?consume clear_caches$8"Jinja2 keeps internal caches for environments and lexers.  These are
    used so that Jinja2 doesn't have to recreate environments and lexers all
    the time.  Normally you don't have to care about that but if you are
    measuring memory consumption you may want to clean the caches.
    #jinja2.environment%_spontaneous_environments'jinja2.lexer)_lexer_cache+clear-"?	?/clear_caches1False3import_string$9?Imports an object based on a string.  This is useful if you want to
    use import paths as endpoints or something similar.  An import path can
    be specified either in dotted notation (``xml.sax.saxutils.escape``)
    or with a colon as object delimiter (``xml.sax.saxutils:escape``).

    If the `silent` is True the return value will be `None` if the import
    fails.

    :return: imported object
    6:8_in:w
E;__nonzero__()Z=>
E?splitA
newInteger(I)Lorg/python/core/PyInteger;CD
?EunpackSequence8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject;GH
?I__getslice__j(Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;KL
EM__getitem__Ow
EP
__import__RgetattrTorg/python/core/PyListW
Xe?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;KZ
E[setExceptionM(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException;]^
?_ImportErroraAttributeErrorcorg/python/core/PyExceptionematch(Lorg/python/core/PyObject;)Zgh
fi__not__k
El
makeException()Lorg/python/core/PyException;no
?pjava/lang/Throwabler5?	?t
import_stringvrbxopen_if_exists$10ZReturns a file descriptor for the filename if that file exists,
    otherwise `None`.
    {open}IOErrorvalue??	f?ENOENT?EISDIR?EINVAL?z?	??open_if_exists?object_type_repr$11?Returns the name of the object's type.  For some recognized
    singletons the name of the object is returned instead. (For
    example for `None` and `Ellipsis`).
    ?_is?w
E?Ellipsis?	__class__?
__module__?__builtin__?builtins?__name__?_add?w
E?	%s object???	??object_type_repr?
pformat$12YPrettyprint an object.  Either use the `pretty` library or the
    builtin `pprint`.
    ?pretty?verbose?g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject;K?
E?pprint?pformat???	??	urlize$13Converts any URLs in text into clickable links. Works on http://,
    https:// and www. links. Links can have trailing punctuation (periods,
    commas, close-parens) and leading punctuation (opening parens) and
    it'll still do the right thing.

    If trim_url_limit is not None, the URLs in link text will be limited
    to trim_url_limit characters.

    If nofollow is True, the URLs in link text will get a rel="nofollow"
    attribute.

    If target is not None, a target attribute will be added to the link.
    ?f$14_isnot?w
E?len?_ge?w
E?...???	??	 rel="%s"? target="%s"?	enumerate?ggroups?
startswith?www.?@?http://?https://?_gt?w
E?endswith?.org?.net?.com?%s?%s?%s?_ne?w
E?__setitem__7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)V??
E???	??urlize?generate_lorem_ipsum$15+Generate some lorem ipsum for the template.?jinja2.constants?LOREM_IPSUM_WORDS?random?choice	randrangerange
capitalize_sub	w
E
_iaddw
E
append 

Markupf$16	

%s

java/lang/Object f_savedlocals[Ljava/lang/Object;  getGeneratorInput()Ljava/lang/Object;  ! " ? ?$java/util/Arrays&fill(([Ljava/lang/Object;Ljava/lang/Object;)V () '* ?? ?,generate_lorem_ipsum.utf-80unicode_urlencode$17&URL escapes a single bytestring or unicode string with the given charset if applicable to URL safe quoting under all rules that need to be considered under all supported Python versions. If non strings are provided they are converted to their unicode representation first. 3encode5replace7%209+; 2? ?=unicode_urlencode?objectALRUCacheC LRUCache$18"A simple LRU Cache implementation.F __init__$19capacityI_mappingK_queueM _postinitO H? ?Q__init__S _postinit$20popleftV_popleftXpopZ_pop\remove^_remove`_wlockb_appendd U? ?f__getstate__$21 h? ?i __getstate__k__setstate__$22__dict__nupdatep m? ?r __setstate__t__getnewargs__$23 v? ?w__getnewargs__ycopy$24&Return a shallow copy of the instance.| {? ?~copy?get$25/Return an item from the cache dict or `default`?KeyError? ?? ??get? setdefault$26vSet `default` if the key is not in the cache otherwise leave unchanged. Return the value of this key. ?acquire?release? addTraceback1(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)V ?? ?? ?? ?? setdefault?clear$27Clear the cache.? ?? ??__contains__$28$Check if a key exists in this cache.? ?? ?? __contains__? __len__$29%Return the current size of the cache.? ?? ??__len__? __repr__$30<%s %r>? ?? ??__getitem__$31?Get an item from the cache. Moves the item up so that it has the highest priority then. Raise a `KeyError` if it does not exist. ? ValueError? ?? ??O__setitem__$32hSets the value for an item. Moves the item up so that it has the highest priority then. ?_eq ?w E? __delitem__(Lorg/python/core/PyObject;)V ?? E? ?? ???__delitem__$33]Remove an item from the cache dict. Raise a `KeyError` if it does not exist. ? ?? ???items$34Return a list of items.?()V c? X?list?dellocal ? ?reverse? ?? ??items? iteritems$35Iterate over all items.?iter? ?? ?? iteritems? values$36Return a list of all values.? ?? ??values? itervalue$37Iterate over all values.? ?? ?? itervalue?keys$387Return a list of all keys ordered by most recent usage.? ?? ??keys? iterkeys$39[Iterate over all keys in the cache dict, ordered by the most recent usage. ?reversed?tuple ?? ?iterkeys__reversed__$40VIterate over the values in the cache dict, oldest items coming first.  ? ?  __reversed__ __copy__ getf_locals   E? ? makeClassa(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject;  ?MutableMappingregisterhtmlhtm xml"select_autoescape$41to_cell(II)V %& 'cIntelligently sets the initial value of autoescaping based on the filename of the template. This is the recommended way to configure autoescaping if you do not want to write a custom function yourself. If you want to enable it for all templates created from strings or for all templates with `.html` and `.xml` extensions:: from jinja2 import Environment, select_autoescape env = Environment(autoescape=select_autoescape( enabled_extensions=('html', 'xml'), default_for_string=True, )) Example configuration to turn it on at all times except if the template ends with `.txt`:: from jinja2 import Environment, select_autoescape env = Environment(autoescape=select_autoescape( disabled_extensions=('txt',), default_for_string=True, default=True, )) The `enabled_extensions` is an iterable of all the extensions that autoescaping should be enabled for. Likewise `disabled_extensions` is a list of all templates it should be disabled for. If a template is loaded from a string then the default from `default_for_string` is used. If nothing matches then the initial value of autoescaping is set to the value of `default`. For security reasons this function operates case insensitive. .. versionadded:: 2.9 )f$42lstrip,lower. +? ?0setderef 2 3f$43 5? ?6 autoescape$44getderef 9? : 8? ?< getclosure >? ??(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;[Lorg/python/core/PyObject;)V cA ?B $? ?Dselect_autoescapeFhtmlsafe_json_dumps$45?Works exactly like :func:`dumps` but is safe for use in ``