guis.py 文件源码

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

项目:script.reddit.reader 作者: gedisony 项目源码 文件源码
def populate_tlc_children(self,tlc_id):
        #controls_generator=generator(controls)
        child_comments_tuple_generator=generator(self.child_lists[tlc_id])

        for control_id in self.x_controls:
            control=self.getControl(control_id)

            try:
                post_text,author,depth=child_comments_tuple_generator.next()
            except StopIteration:
                post_text,author,depth=None,None,0

            if post_text:
                #control.setText( ("[B]"+repr(control_id-1000)+"[/B] " + post_text) if post_text else None)
                #control.setText(post_text+' '+author)
                #log(('.'*depth)+repr(post_text))
                control.setText(post_text)
            else:
                control.setText(None)
            #use animation to stagger the comments according to how deep they are
            control.setAnimations( [ animation_format(0,100,'slide', 0, (20*depth), 'sine', 'in' ) ] )

        #either there's no more child comments or we run out of controls
        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号