X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=vstf%2Fvstf%2Fcommon%2Fpyhtml.py;h=f3adee8d178698089e4918ecd9b3e7372c80c787;hb=5b4f794932cb9b28ec679e6dd88e6febb2a5db7b;hp=c2a262085308fa2ed986c52b239165bd7fa3e8d7;hpb=827a986f4abc404dc803380a25d5e9ade7448f67;p=bottlenecks.git diff --git a/vstf/vstf/common/pyhtml.py b/vstf/vstf/common/pyhtml.py index c2a26208..f3adee8d 100755 --- a/vstf/vstf/common/pyhtml.py +++ b/vstf/vstf/common/pyhtml.py @@ -1,8 +1,12 @@ -#!/usr/bin/python -# -*- coding: utf8 -*- -# author: wly -# date: 2015-09-25 -# see license for license details +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + from sys import stdout, modules @@ -30,11 +34,15 @@ html5_tags = {'article', 'aside', 'audio', 'bdi', 'canvas', 'command', 'datalist nl = '\n' tags = html4_tags | disused_tags | html5_tags -__all__ = [x.title() for x in tags] + ['PyHtml'] +__all__ = [x.title() for x in tags] + ['PyHtml', 'space'] self_close = {'input', 'img', 'link', 'br'} +def space(n): + return ' ' * n + + class Tag(list): tag_name = ''