ó ™Tc@€sòddlmZddlZddlmZddlmZddlmZddl m Z e ddƒ7dej krŽdd l mZndd lmZWdQXddd d d „Zd efd„ƒYZd„ZedkrîeƒndS(iÿÿÿÿ(twith_statementN(tcontextmanager(tStringIO(tescapei(tLibtoolImportert UNINSTALLED_INTROSPECTION_SRCDIR(tcollect_attributesit cC€s¢|dkrg}nd|f}|dk rht|tƒrO|jdƒ}ndt|ƒ|f}nd}t||||t|ƒt|ƒƒ}|||S(Nu<%ssUTF-8u>%su/>(tNonet isinstancetstrtdecodeRRtlen(ttag_namet attributestdatat self_indenttself_indent_chartprefixtsuffixtattrs((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt build_xml_tag's    t XMLWritercB€seZd„Zd d„Zd„Zd„Zd„Zd„Zde e d„Z d„Z d d „Z d d „Zd „Zed d „ƒZRS(cC€sEtƒ|_|jjdƒg|_d|_d|_|jƒdS(Ns ii(Rt_datatwritet _tag_stackt_indentt _indent_unittenable_whitespace(tself((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt__init__<s     cC€sX|dkrg}nt|||j|jt|ƒdƒ}|jd||fƒdS(Niu<%s%s>(RRRt _indent_charR t write_line(RR RR((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt _open_tagFs    cC€s|jd|fƒdS(Nu(R (RR ((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt _close_tagMscC€sd|_d|_dS(NRs (Rt _newline_char(R((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyRRs cC€sd|_d|_dS(Nt(RR#(R((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pytdisable_whitespaceVs cC€s |jjƒS(N(Rtgetvalue(R((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pytget_xmlZsucC€sœt|tƒr!|jdƒ}n|r6t|ƒ}n|rr|jjd|j|j|jdƒ|j fƒn&|jjd|jdƒ|j fƒdS(Nsutf-8s%s%s%ss%s%s( R R R RRRRRtencodeR#(Rtlinetindentt do_escape((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyR ]s cC€s|jd|fƒdS(Ns (R (Rttext((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt write_commentjscC€s)|jt||||j|jƒƒdS(N(R RRR(RR RR((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt write_tagmscC€sK|dkrg}n|j||ƒ|jj|ƒ|j|j7_dS(N(RR!RtappendRR(RR R((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pytpush_tagqs   cC€s2|j|j8_|jjƒ}|j|ƒ|S(N(RRRtpopR"(RR ((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pytpop_tagxs cc€s+|j||ƒz dVWd|jƒXdS(N(R0R2(RR R((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt tagcontext~s N(t__name__t __module__RRR!R"RR%R'tTruetFalseR R-R.R0R2RR3(((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyR:s         cC€s¢tƒ}|jdƒ|jdƒ|jdƒ|jdddddgƒ|jƒ|jƒ|jƒ|jƒ}|jd ƒ}d dl}|j|ƒdS(Nt repositoryt namespacet enumerationtmembertnametwesttvaluet7s c:identifiertGTK_ANCHOR_WESTs glib:nicks iÿÿÿÿ(snameR=(svalueR?(s c:identifierR@(s glib:nickR=(RR0R2R'tsplittpprint(twtxtlinesRB((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyttest‡s"            t__main__(t __future__Rtost contextlibRt cStringIORtxml.sax.saxutilsRtlibtoolimporterRRtenviront _giscannerRtgiscanner._giscannerRtobjectRRFR4(((ss/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyts   M