def iziImage(source, height, width): if ((height in int_collection) or (height in float_collection)) & ((width in int_collection) or (width in float_collection)): if (height in int_collection): imgheight = int_collection.get(height) else : imgheight = float_collection.get(height) if (width in int_collection): imgwidth = int_collection.get(width) else : imgwidth = float_collection.get(width) with tag('img'): doc.attr(src = source, height = imgheight, width = imgwidth) else : print("S#!T")
def hyper_function(alias, url): with tag('a'): doc.attr(href = url) text(alias)