MSV FM

[email protected]: ~ $
Path : /usr/lib64/python2.7/site-packages/lxml/
File Upload :
Current < : //usr/lib64/python2.7/site-packages/lxml/builder.pyo

�
�'�Yc@s�dZddljZddlmZyeWnek
rFeZnXye	Wnek
rheZ	nXde
fd��YZe�ZdS(s9
The ``E`` Element factory for generating XML documents.
i����N(tpartialtElementMakercBs5eZdZddddd�Zd�Zd�ZRS(scElement generator factory.

    Unlike the ordinary Element factory, the E factory allows you to pass in
    more than just a tag and some optional attributes; you can also pass in
    text and other elements.  The text is added as either text or tail
    attributes, and elements are inserted at the right spot.  Some small
    examples::

        >>> from lxml import etree as ET
        >>> from lxml.builder import E

        >>> ET.tostring(E("tag"))
        '<tag/>'
        >>> ET.tostring(E("tag", "text"))
        '<tag>text</tag>'
        >>> ET.tostring(E("tag", "text", key="value"))
        '<tag key="value">text</tag>'
        >>> ET.tostring(E("tag", E("subtag", "text"), "tail"))
        '<tag><subtag>text</subtag>tail</tag>'

    For simple tags, the factory also allows you to write ``E.tag(...)`` instead
    of ``E('tag', ...)``::

        >>> ET.tostring(E.tag())
        '<tag/>'
        >>> ET.tostring(E.tag("text"))
        '<tag>text</tag>'
        >>> ET.tostring(E.tag(E.subtag("text"), "tail"))
        '<tag><subtag>text</subtag>tail</tag>'

    Here's a somewhat larger example; this shows how to generate HTML
    documents, using a mix of prepared factory functions for inline elements,
    nested ``E.tag`` calls, and embedded XHTML fragments::

        # some common inline elements
        A = E.a
        I = E.i
        B = E.b

        def CLASS(v):
            # helper function, 'class' is a reserved word
            return {'class': v}

        page = (
            E.html(
                E.head(
                    E.title("This is a sample document")
                ),
                E.body(
                    E.h1("Hello!", CLASS("title")),
                    E.p("This is a paragraph with ", B("bold"), " text in it!"),
                    E.p("This is another paragraph, with a ",
                        A("link", href="http://www.python.org"), "."),
                    E.p("Here are some reserved characters: <spam&egg>."),
                    ET.XML("<p>And finally, here is an embedded XHTML fragment.</p>"),
                )
            )
        )

        print ET.tostring(page)

    Here's a prettyprinted version of the output from the above script::

        <html>
          <head>
            <title>This is a sample document</title>
          </head>
          <body>
            <h1 class="title">Hello!</h1>
            <p>This is a paragraph with <b>bold</b> text in it!</p>
            <p>This is another paragraph, with <a href="http://www.python.org">link</a>.</p>
            <p>Here are some reserved characters: &lt;spam&amp;egg&gt;.</p>
            <p>And finally, here is an embedded XHTML fragment.</p>
          </body>
        </html>

    For namespace support, you can pass a namespace map (``nsmap``)
    and/or a specific target ``namespace`` to the ElementMaker class::

        >>> E = ElementMaker(namespace="http://my.ns/")
        >>> print(ET.tostring( E.test ))
        <test xmlns="http://my.ns/"/>

        >>> E = ElementMaker(namespace="http://my.ns/", nsmap={'p':'http://my.ns/'})
        >>> print(ET.tostring( E.test ))
        <p:test xmlns:p="http://my.ns/"/>
    cs!|dk	r d|d|_n	d|_|rAt|�|_n	d|_|dk	rb||_ntj|_�r�t���ni�d�}d�}t�kr�|�t<nt�kr�|�t<ntj	�kr�|�tj	<n�fd�}t�kr|�t<n�|_
dS(Nt{t}cSsPy"|djpd||d_Wn'tk
rK|jp>d||_nXdS(Ni����t(ttailt
IndexErrorttext(telemtitem((s2/usr/lib64/python2.7/site-packages/lxml/builder.pytadd_text�s"
cSs,|jrtd|j��n||_dS(Ns<Can't add a CDATA section. Element already has some text: %r(Rt
ValueError(Rtcdata((s2/usr/lib64/python2.7/site-packages/lxml/builder.pyt	add_cdata�s	csc|j}xS|j�D]E\}}t|t�r>|||<q�t|�d|�||<qWdS(N(tattribtitemst
isinstancet
basestringttypetNone(RR	Rtktv(ttypemap(s2/usr/lib64/python2.7/site-packages/lxml/builder.pytadd_dict�s
	
(Rt
_namespacetdictt_nsmapt_makeelementtETtElementtstrtunicodetCDATAt_typemap(tselfRt	namespacetnsmaptmakeelementR
R
R((Rs2/usr/lib64/python2.7/site-packages/lxml/builder.pyt__init__�s0				


c
Osi|j}|jdk	r8|ddkr8|j|}n|j|d|j�}|rj|t||�nx�|D]�}t|�r�|�}n|jt|��}|dkr-t	j
|�r�|j|�qqnxXt|�jD]%}|j|�}|dk	r�Pq�q�Wt
dt|�j|f��n|||�}	|	rq|jt|	��||	�qqqqW|S(NiRR$sbad argument type: %s(%r)(R!RRRRRtcallabletgetRRt	iselementtappendt__mro__t	TypeErrort__name__(
R"ttagtchildrenRRRR	tttbasetypeR((s2/usr/lib64/python2.7/site-packages/lxml/builder.pyt__call__�s0	

#cCs
t||�S(N(R(R"R.((s2/usr/lib64/python2.7/site-packages/lxml/builder.pyt__getattr__�sN(R-t
__module__t__doc__RR&R2R3(((s2/usr/lib64/python2.7/site-packages/lxml/builder.pyR7s
W6	(
R5t
lxml.etreetetreeRt	functoolsRRt	NameErrorRRtobjectRtE(((s2/usr/lib64/python2.7/site-packages/lxml/builder.pyt<module>&s



�
Bethany
Bethany
0%

THE FINEST HOTEL NEAR LAKE KIVU

The Perfect Base For You

Required fields are followed by *





EC1A68011

About Us

Delicious Interior With The Pinch Of Everything

Bethany Investment group is Presbyterian church in Rwanda(EPR) company that manage Hotel and Guest house in Karongi (Bethany Hotel), ISANO branch in GIKONDO(Kigali), Kiyovu branch(Kigali), AMIZERO branch(Nyagatare-East) and Gisenyi Branch(Rubavu).

Accomodation

Get a Comfortable Room
Feel The Comfort

Get a comfortable room and feel our hotel’s comfort. Bethany Hotel features a variety of fully furnished rooms with extra space, Executive rooms, Deluxe rooms with a beautiful lake view and garden space, Deluxe rooms, comfort rooms, family rooms and standard rooms at your service.

Standard Single

Services

We Provide Top Class Facility
Especially For You

Beach BBQ Party

Kick back on the beach& and enjoy our berbecue from our masterchef

Breakfast

Kick back at our hotels& enjoy our breakfast from our masterchef

Conference Hall

Kick back at our hotels& enjoy our conference halls from all bethany branches

Enjoy with your partner

Honeymoon Package

80%

Get In Touch

Don’t Miss Any Update

    +

    Search your Room

    Required fields are followed by *