当前位置: 首页>>代码示例>>Python>>正文


Python AsciiTable.inner_footing_row_border方法代码示例

本文整理汇总了Python中terminaltables.AsciiTable.inner_footing_row_border方法的典型用法代码示例。如果您正苦于以下问题:Python AsciiTable.inner_footing_row_border方法的具体用法?Python AsciiTable.inner_footing_row_border怎么用?Python AsciiTable.inner_footing_row_border使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在terminaltables.AsciiTable的用法示例。


在下文中一共展示了AsciiTable.inner_footing_row_border方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_single_line

# 需要导入模块: from terminaltables import AsciiTable [as 别名]
# 或者: from terminaltables.AsciiTable import inner_footing_row_border [as 别名]
def test_single_line():
    """Test single-lined cells."""
    table_data = [
        ['Name', 'Color', 'Type'],
        ['Avocado', 'green', 'nut'],
        ['Tomato', 'red', 'fruit'],
        ['Lettuce', 'green', 'vegetable'],
        ['Watermelon', 'green'],
        [],
    ]
    table = AsciiTable(table_data, 'Example')
    table.inner_footing_row_border = True
    table.justify_columns[0] = 'left'
    table.justify_columns[1] = 'center'
    table.justify_columns[2] = 'right'
    actual = table.table

    expected = (
        '+Example-----+-------+-----------+\n'
        '| Name       | Color |      Type |\n'
        '+------------+-------+-----------+\n'
        '| Avocado    | green |       nut |\n'
        '| Tomato     |  red  |     fruit |\n'
        '| Lettuce    | green | vegetable |\n'
        '| Watermelon | green |           |\n'
        '+------------+-------+-----------+\n'
        '|            |       |           |\n'
        '+------------+-------+-----------+'
    )
    assert actual == expected
开发者ID:Robpol86,项目名称:terminaltables,代码行数:32,代码来源:test_ascii_table.py

示例2: output_ascii_table

# 需要导入模块: from terminaltables import AsciiTable [as 别名]
# 或者: from terminaltables.AsciiTable import inner_footing_row_border [as 别名]
def output_ascii_table(table_title=None,
                       table_data=None,
                       inner_heading_row_border=False,
                       inner_footing_row_border=False,
                       inner_row_border=False):
    """
    @type table_title: unicode
    @type table_data: list
    @type inner_heading_row_border: bool
    @type inner_footing_row_border: bool
    @type inner_row_border: bool
    """
    table = AsciiTable(table_data)
    table.inner_heading_row_border = inner_heading_row_border
    table.inner_row_border = inner_row_border
    table.inner_footing_row_border = inner_footing_row_border
    table.title = table_title
    print(table.table)
开发者ID:jonhadfield,项目名称:acli,代码行数:20,代码来源:__init__.py

示例3: display_pull_stats

# 需要导入模块: from terminaltables import AsciiTable [as 别名]
# 或者: from terminaltables.AsciiTable import inner_footing_row_border [as 别名]
def display_pull_stats(reviewers, reviewer_workload):
    table_data = [
        ['Assignee', '# assigned'],
    ]

    total = 0
    for reviewer in reviewers:
        workload = reviewer_workload[reviewer]
        table_data.append(
            [reviewer, six.text_type(workload)]
        )
        total += workload

    table_data.append(['TOTAL: ', six.text_type(total)])

    table = AsciiTable(table_data)
    table.inner_footing_row_border = True
    table.justify_columns = {1: 'center'}
    print(table.table)
开发者ID:agamdua,项目名称:mirage,代码行数:21,代码来源:assign.py

示例4: list

# 需要导入模块: from terminaltables import AsciiTable [as 别名]
# 或者: from terminaltables.AsciiTable import inner_footing_row_border [as 别名]
            # Add message to list
            tmpdata.append(mess_deleted)
        else :
            # Add message to list
            tmpdata.append("Google Agenda booked but ITEA calendar not")
    
    # Add tmpdata list to myAsciiTable 
    myAsciiTable.append(tmpdata)
                    
# Create AsciiTable and total
tmpdata = list()
tmpdata.append("Total : " + str(len(myAsciiTable) - 1) + " row(s)")
tmpdata.append("")
tmpdata.append("")
tmpdata.append("")
tmpdata.append("")
myAsciiTable.append(tmpdata)
myTable = AsciiTable(myAsciiTable)
myTable.inner_footing_row_border = True
myTable.justify_columns[1] = myTable.justify_columns[2] = myTable.justify_columns[3] = 'right'

# End script
time_stop = datetime.datetime.now()
time_delta = time_stop - time_start

# Output data
print "######### Date : %s - App : %s #########" % (time_start.strftime("%Y-%m-%d"),Config.get('GLOBAL','application'))
print "- Start time : %s" % (time_start.strftime("%Y-%m-%d %H:%M:%S"))
print "- Finish time : %s" % (time_stop.strftime("%Y-%m-%d %H:%M:%S"))
print "- Delta time : %d second(s)" % (time_delta.total_seconds())
print myTable.table
开发者ID:fmonthel,项目名称:IteaToGcal,代码行数:33,代码来源:check-diff.py


注:本文中的terminaltables.AsciiTable.inner_footing_row_border方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。