Ñò ²þGc@s¿dZddklZdgZd„Zddd„ƒYZddd„ƒYZd dd „ƒYZd „ZhZ xd i ƒD]Z de e >> html.a(href='http://www.yahoo.com', name=None, c='Click Here') 'Click Here' If a non-string is passed in, then ``webhelpers.escapes.html_escape`` is called on the value. ``html`` can also be called, and it will concatenate the string representations of its arguments. ``html.comment`` will generate an HTML comment, like ``html.comment('comment text', 'and some more text')`` -- note that it cannot take keyword arguments (because they wouldn't mean anything). For cases where you cannot use a name (e.g., for the ``class`` attribute) you can append an underscore to the name, like ``html.span(class_='alert')``. Examples:: >>> html.html( ... html.head(html.title("Page Title")), ... html.body( ... bgcolor='#000066', ... text='#ffffff', ... c=[html.h1('Page Title'), ... html.p('Hello world!')], ... )) 'Page Title

Page Title

Hello world!

' >>> html.a(href='#top', c='return to top') 'return to top' .. note:: Should this return objects instead of strings? That would allow things like ``html.a(href='foo')('title')``. Also, the objects could have a method that shows that they are truly HTML, and thus should not be further quoted. However, in some contexts you can't use objects, you need actual strings. But maybe we can just make sure those contexts don't happen in webhelpers. iÿÿÿÿ(t html_escapethtmlcCs\|djodSt|tƒpt|ƒ}nt|tƒo|iddƒ}n|S(Nttasciitxmlcharrefreplace(tNonet isinstancet basestringtunicodetencode(ts((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pytstrifyCs tUnfinishedCommentcBseZd„ZRS(cGsdditt|ƒƒS(Ns s (tjointmapR (tselftargs((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyt__call__Ns(t__name__t __module__R(((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyR LstBasecBs5eZeƒZd„Zd„Zd„Zd„ZRS(cCs0|idƒo t‚n|iƒ}t|ƒS(Nt__(t startswithtAttributeErrortlowert UnfinishedTag(Rtattr((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyt __getattr__Us  cGsditt|ƒƒS(NR(R Rtstr(RR((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyR[scGsditt|ƒƒS(NR(R RR(RR((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pytescape^scCs t|ƒS(N(R (Rtarg((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyRas(RRR tcommentRRRR(((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyRQs     RcBs#eZd„Zd„Zd„ZRS(cCs ||_dS(N(t_tag(Rttag((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyt__init__fscOst|i||ŽS(N(R!R (RRtkw((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyRiscCs4|itjo d|iSd|i|ifSdS(Ns<%s />s <%s>(R t empty_tags(R((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyt__str__ls (RRR"RR%(((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyRds  c Os|idƒo,|otdƒ‚n|d}|d=ng}xi|iƒD][\}}|djoqOn|idƒo|d }n|id|t|ƒfƒqOW| o%|tjod|di|ƒfSd|di|ƒdit t |ƒƒ|fSdS( NtcsYThe special 'c' keyword argument cannot be used in conjunction with non-keyword argumentst_iÿÿÿÿs %s="%s"s<%s%s />Rs <%s%s>%s( thas_keyt TypeErrortitemsRtendswithtappendRR$R RR (R!RR#tattrargsRtvalue((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyR!rs&     !$sDarea base basefont br col frame hr img input isindex link meta params·applet blockquote body br dd div dl dt fieldset form frameset head hr html iframe map menu noframes noscript object ol optgroup p param script select table tbody tfoot thead tr ul varN((((t__doc__tutilRt__all__R R RRR!R$tsplitt_tRtblock_level_tagsR(((s6/usr/lib/python2.6/site-packages/webhelpers/htmlgen.pyt=s