Example #1
0
      e
       f
        g
         h
        i
       j
      k
     l
    m
   n
  o"""

_ = pykram.document()
metal = _._ns("metal","http://www.xmtl.org/version/2010/04")

style = pyelyts.document()
style(".aword")(color="red")
style(".adigit")(color="blue")

html = _.html(
  _.head(
    _.title("test"),
    _.meta(http_equiv_='Content-Type', content="charset=utf-8"),
    _.style(_._bare(str(style)), type="text/css")
  ),
  _.body(
    _.div(_empty=True),
    _.ul(
      [_.li( s, class_='aword' ) for s in ['one & two','two & three','"<three>" & %s' % "'four'"]],
      [(_.li( s, class_='adigit' ),_.li( s, class_='adup' ) ) for s in ['4','5','6']],      
      class_='unordered'
Example #2
0
  import pyelyts
except ImportError:
  try:
    import os
    import sys
    sys.path.append(os.path.dirname(sys.argv[0]))
    import pyelyts
  except ImportError:
    try:
      sys.path.append(os.path.join(os.path.dirname(sys.argv[0]),'..'))
      import pyelyts
    except ImportError:
      print __doc__
      sys.exit( 1 )

select = pyelyts.document()

select("html", "body", "#wrapper")(
  height="98%",
  margin="0",
  padding="0",
  border="none",
  text_align_="center",
  font_family_="Verdana,Arial,Helvetica,sans-serif"
)
select("#wrapper")(
  margin="0 auto",
  text_align_="left",
  vertical_align_="middle",
  width="400px"
)