menu_screen.py 文件源码

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

项目:botany 作者: jifunks 项目源码 文件源码
def ascii_render(self, filename, ypos, xpos):
        # Prints ASCII art from file at given coordinates
        this_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)),"art")
        this_filename = os.path.join(this_dir,filename)
        this_file = open(this_filename,"r")
        this_string = this_file.readlines()
        this_file.close()
        for y, line in enumerate(this_string, 2):
            self.screen.addstr(ypos+y, xpos, line, curses.A_NORMAL)
        # self.screen.refresh()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号