Example #1
0
 def list_plugins(cls):
     pt = PrintTable(['name', 'version', 'author', 'description'])
     for plugin_name in cls.plugins.keys():
         pt.add_row([
             plugin_name,
             cls.plugin_info[plugin_name]['version'],
             cls.plugin_info[plugin_name]['author'],
             cls.plugin_info[plugin_name]['description'],
         ])
     if pt.row_data:
         print(pt)
     else:
         print("No plugins found!")
Example #2
0
 def list_plugins(cls):
     pt = PrintTable(['name', 'version', 'author', 'description'])
     for plugin_name in cls.plugins.keys():
         pt.add_row([
             plugin_name,
             cls.plugin_info[plugin_name]['version'],
             cls.plugin_info[plugin_name]['author'],
             cls.plugin_info[plugin_name]['description'],
         ])
     if pt.row_data:
         print(pt)
     else:
         print("No plugins found!")
Example #3
0
from printtable import PrintTable

table = PrintTable(["name", "old"])
table.append_data(name="Jack", old="20")
table.append_data(name=["Jack", "Mary"], old=["20", "19"])
table.append_data_list(["Jack", "20"])

print "The table with line number\n"
table.printTable(1)

print "The table without line number\n"
table.printTable()
Example #4
0
# coding=utf-8
from  printtable import PrintTable    

table = PrintTable(['name','old'])
table.append_data(name = "小明",old = "20")
table.append_data(name =["小华","大傻"], old =["20","19"])
table.append_data_list(["二傻子","20"]) 

print "The table with line number\n"   
table.printTable(1)

print "The table without line number\n"   
table.printTable()
Example #5
0
from printtable import PrintTable

table = PrintTable(['name', 'old'])
table.append_data(name="Jack", old="20")
table.append_data(name=["Jack", "Mary"], old=["20", "19"])
table.append_data_list(["Jack", "20"])

print "The table with line number\n"
table.printTable(1)

print "The table without line number\n"
table.printTable()
Example #6
0
# coding=utf-8
from printtable import PrintTable

table = PrintTable(['name', 'old'])
table.append_data(name="小明", old="20")
table.append_data(name=["小华", "大傻"], old=["20", "19"])
table.append_data_list(["二傻子", "20"])

print("The table with line number\n")
table.printTable(1)

print("The table without line number\n")
table.printTable()