python类full()的实例源码

tool.py 文件源码 项目:sequitur-g2p 作者: Holzhaus 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def runMain(main, options, args):
    if options.profile:
    if True:
        import hotshot
        profile = hotshot.Profile(options.profile)
        profile.runcall(main, options, args)
        profile.close()
        import hotshot.stats
        stats = hotshot.stats.load(options.profile)
    else:
        import profile
        profile.run('main(options, args)', options.profile)
        import pstats
        stats = pstats.Stats(options.profile)
    stats.strip_dirs()
    stats.sort_stats('time', 'calls')
    stats.print_stats(20)
    elif options.psyco:
    import psyco
    psyco.full()
    status = main(options, args)
    else:
    status = main(options, args)
    return status
recipe-413432.py 文件源码 项目:code 作者: ActiveState 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def plot(self,ch,point):
        """
        Appends a point to the channel(curve) object ch.
        Fills the scene and after it is full,
        shifts the curve one step left, for each new point.
        If its the first point it creates the plot.
        """
        #Adjust the scene and frames vertically to folow data
        if point[1] > self.scene.range[1]:
            self.scene.center[1] = point[1]-9
            self.grid.y = point[1]-9
            self.ticklabels.y = point[1]-9
        elif  point[1] < -self.scene.range[1]:
            self.scene.center[1] = point[1]+9
            self.grid.y = point[1]+9
            self.ticklabels.y = point[1]+9
        #=========================================    
        if self.scene.kb.keys:#key trap
            s = self.scene.kb.getkey() # obtain keyboard information
            if s == 'g' or s == 'G':
                self.toggleGrid()
        # Scroll scene center right to follow data        
        if len(ch.x) > 0 and ch.x[-1] > 10:
            # scroll center of the scene with x
            new_x_center = (ch.x[0]+ch.x[-1])/2.
            self.scene.center = (new_x_center,0,0)
            self.updateTicks(ch.x,ch.y)
            self.grid.x = new_x_center
            self.ticklabels.x = new_x_center

            # shift curve and append

            ch.pos[:-1] = ch.pos[1:]
            ch.pos[-1] = point
        else:
            ch.append(pos=point)
bytecode.py 文件源码 项目:ApkParser 作者: yigitozgumus 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def __init__(self, buff):
        try:
            import psyco
            psyco.full()
        except ImportError:
            pass

        self.__buff = buff
        self.__idx = 0
bytecode.py 文件源码 项目:pyaxmlparser 作者: appknox 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self, buff):
        try:
            import psyco
            psyco.full()
        except ImportError:
            pass

        self.__buff = buff
        self.__idx = 0
bytecode.py 文件源码 项目:Tacita 作者: Quantika14 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def __init__(self, buff):
        try:
            import psyco
            psyco.full()
        except ImportError:
            pass

        self.__buff = buff
        self.__idx = 0
bytecode.py 文件源码 项目:django-droidstore 作者: mathuin 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self, buff):
        try:
            import psyco
            psyco.full()
        except ImportError:
            pass

        self.__buff = buff
        self.__idx = 0
bytecode.py 文件源码 项目:android_malware_detection 作者: congyuandong 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def __init__(self, buff):
        try:
            import psyco
            psyco.full()
        except ImportError:
            pass

        self.__buff = buff
        self.__idx = 0
bytecode.py 文件源码 项目:android_malware_detection 作者: congyuandong 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def __init__(self, buff):
        try:
            import psyco
            psyco.full()
        except ImportError:
            pass

        self.__buff = buff
        self.__idx = 0
bytecode.py 文件源码 项目:DroidWatcher 作者: suemi994 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, buff):
        try:
            import psyco
            psyco.full()
        except ImportError:
            pass

        self.__buff = buff
        self.__idx = 0
bytecode.py 文件源码 项目:DroidWatcher 作者: suemi994 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, buff):
        try:
            import psyco
            psyco.full()
        except ImportError:
            pass

        self.__buff = buff
        self.__idx = 0


问题


面经


文章

微信
公众号

扫码关注公众号