In [1]:
from remarkuple import helper as h, table, svg
In [2]:
t = h.div('text ', h.a("link"), h.b(" bold"), h.i(" italic"))
print t
t
Out[2]:
In [3]:
csv = """Title,Name,Phone
Mr.,John,07868785831
Miss,Linda,0141-2244-5566
Master,Jack,0142-1212-1234
Mr.,Bush,911-911-911"""
tbl = table()
tbl.addCaption("Contacts")
for idx, row in enumerate(csv.split("\n")):
if idx:
tbl.addBodyRow(h.tr(*[h.td(x) for x in row.split(",")]))
else:
tbl.addHeadRow(h.tr(*[h.th(x) for x in row.split(",")]))
#print tbl
tbl
Out[3]:
In [4]:
s = svg().set_axes(False).set_grid(True)
s.set_circle(r=100, fill="green", style="fill-opacity: 50%")
print s
h.br
s
Out[4]:
In [5]:
print svg()
Copyright (c) 2014 Marko Manninen