basemode.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:shadowbroker-auto 作者: wrfly 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号