Пример #1
0
def read_template(html_name):
    ppwd = get_package_dir()
    html_name = html_name + ".html"
    template_file = os.path.abspath(os.path.join(ppwd, 'template', html_name))
    filey = open(template_file, "r")
    template = "".join(filey.readlines())
    filey.close()
    return template
Пример #2
0
def get_image(image_name):
    ppwd = get_package_dir()
    return os.path.join(ppwd, 'img', image_name)