tracknodes.py 文件源码

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

项目:tracknodes 作者: NREL 项目源码 文件源码
def print_history(self):
        """
        Print database information to STDOUT
        """
        try:
            print("History of Nodes")
            print("=========")
            self.cur.execute("SELECT * FROM NodeStates ORDER BY datetime(Time) DESC")
            rows = self.cur.fetchall()
            for row in rows:
                print("%s | %s | %s | '%s'" % (row[0], row[3], TrackNodes.decode_state(row[1]), row[2]))
            print("")
        except IOError as e:
            if e.errno == errno.EPIPE:
                # Perhaps output was piped to less and was quit prior to EOF
                return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号