def _display_completions(self, completions):
if not completions:
return
self.console.write('\n')
wmax = max(map(len, completions))
w, h = self.console.size()
cols = max(1, int((w-1) / (wmax+1)))
rows = int(math.ceil(float(len(completions)) / cols))
for row in range(rows):
s = ''
for col in range(cols):
i = col*rows + row
if i < len(completions):
self.console.write(completions[i].ljust(wmax+1))
self.console.write('\n')
if in_ironpython:
self.prompt=sys.ps1
self._print_prompt()
评论列表
文章目录