σ ’d[c@ΰsiddlmZddlmZddlmZddlmZddlmZddlZddlZddlm Z ddl m Z d d l m Z ejjd kr½dd lmZndd lmZeZe ddƒ7d ejkrddlmZnddlmZWdQXddddd„Zdefd„ƒYZd„ZedkreeƒndS(i(twith_statement(tabsolute_import(tdivision(tprint_function(tunicode_literalsN(tcontextmanager(tescapei(tLibtoolImporteri(tStringIOu UNINSTALLED_INTROSPECTION_SRCDIR(tcollect_attributesu cCΰs’|dkrg}nd|f}|dk rht|tƒrO|jdƒ}ndt|ƒ|f}nd}t||||t|ƒt|ƒƒ}|||S(Nu<%suUTF-8u>%su/>(tNonet isinstancetbytestdecodeRR tlen(ttag_namet attributestdatat self_indenttself_indent_chartprefixtsuffixtattrs((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt build_xml_tag1s    t XMLWritercBΰs˜eZd„Zdd„Zd„Zd„Zd„Zd„Zd„Z de e d„Z d „Z dd „Zdd „Zd „Zedd „ƒZRS(cCΰsEtƒ|_|jjdƒg|_d|_d|_|jƒdS(Nu ii(Rt_datatwritet _tag_stackt_indentt _indent_unittenable_whitespace(tself((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt__init__Fs     cCΰsX|dkrg}nt|||j|jt|ƒdƒ}|jd||fƒdS(Niu<%s%s>(R R Rt _indent_charRt write_line(RRRR((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt _open_tagTs    cCΰs|jd|fƒdS(Nu(R"(RR((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt _close_tag[scCΰsd|_d|_dS(Nu u (R!t _newline_char(R((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyR`s cCΰsd|_d|_dS(Nu(R!R%(R((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pytdisable_whitespaceds cCΰs |jjƒS(u,Returns a unicode string containing the XML.(Rtgetvalue(R((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pytget_xmlhscCΰs|jjƒjdƒS(u8Returns a utf-8 encoded bytes object containing the XML.uutf-8(RR'tencode(R((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pytget_encoded_xmllsucCΰsŸt|tƒr!|jdƒ}nt|tƒs6t‚|rKt|ƒ}n|r~|jjd|j|j ||j fƒn|jjd||j fƒdS(Nuutf-8u%s%s%su%s%s( R R R tunicodetAssertionErrorRRRR!RR%(Rtlinetindentt do_escape((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyR"pscCΰs|jd|fƒdS(Nu (R"(Rttext((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt write_comment}scCΰs)|jt||||j|jƒƒdS(N(R"RRR!(RRRR((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt write_tag€scCΰsK|dkrg}n|j||ƒ|jj|ƒ|j|j7_dS(N(R R#RtappendRR(RRR((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pytpush_tag„s   cCΰs2|j|j8_|jjƒ}|j|ƒ|S(N(RRRtpopR$(RR((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pytpop_tag‹s ccΰs+|j||ƒz dVWd|jƒXdS(N(R4R6(RRR((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyt tagcontext‘s N(t__name__t __module__R R R#R$RR&R(R*tTruetFalseR"R1R2R4R6RR7(((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyRDs           cCΰsΞtƒ}|jdƒ|jdƒ|jdƒ|jdddddgƒ|jƒ|jƒ|jƒ|jƒ}|jd ƒ}d dl}|j|ƒt|dƒdksΚtt|dƒƒ‚dS(Nu repositoryu namespaceu enumerationumemberunameuwestuvalueu7u c:identifieruGTK_ANCHOR_WESTu glib:nicku iiiP(unameuwest(uvalueu7(u c:identifieruGTK_ANCHOR_WEST(u glib:nickuwest(RR4R6R(tsplittpprintRR,(twtxtlinesR=((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyttestšs"            u__main__(t __future__RRRRRtostsyst contextlibRtxml.sax.saxutilsRtlibtoolimporterRt version_infotmajorRtiotstrR+R tenviront _giscannerR tgiscanner._giscannerRtobjectRRAR8(((sm/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyts.    V