예제 #1
0
 def convert(self, k, v, column):
     if column == 1:
         return "Y" if v[0] else "N"
     elif column == 2:
         return short_format(v[1])
     else:
         raise ValueError
예제 #2
0
def _show_datasets(datasets):
    clear_screen()
    table = PrettyTable(["Dataset", "Persistent", "Value"])
    for k, (persist, value) in sorted(datasets.items(), key=itemgetter(0)):
        table.add_row([k, "Y" if persist else "N", short_format(value)])
    print(table)
예제 #3
0
파일: datasets.py 프로젝트: cntnly/artiq
 def convert(self, k, v, column):
     return short_format(v[1])
예제 #4
0
def _show_datasets(datasets):
    clear_screen()
    table = PrettyTable(["Dataset", "Persistent", "Value"])
    for k, (persist, value) in sorted(datasets.items(), key=itemgetter(0)):
        table.add_row([k, "Y" if persist else "N", short_format(value)])
    print(table)
예제 #5
0
 def convert(self, k, v, column):
     return short_format(v[1])