DataTreeGrab.py 文件源码

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

项目:DataTree 作者: tvgrabbers 项目源码 文件源码
def __init__(self, data, output = sys.stdout, warnaction = "default", warngoal = sys.stderr, caller_id = 0):
        DATAtree.__init__(self, output, warnaction, warngoal, caller_id)
        with self.tree_lock:
            self.tree_type ='json'
            self.extract_from_parent = True
            self.data = data
            # Read the json data into the tree
            try:
                self.root = JSONnode(self, data, key = 'ROOT')
                self.start_node = self.root

            except:
                self.warn('Unable to parse the JSON data. Invalid dataset!', dtDataWarning, 1)
                self.start_node = NULLnode()

# end JSONtree
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号