當前位置: 首頁>>代碼示例>>Python>>正文


Python psyco.bind方法代碼示例

本文整理匯總了Python中psyco.bind方法的典型用法代碼示例。如果您正苦於以下問題:Python psyco.bind方法的具體用法?Python psyco.bind怎麽用?Python psyco.bind使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在psyco的用法示例。


在下文中一共展示了psyco.bind方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _psyco_speedup

# 需要導入模塊: import psyco [as 別名]
# 或者: from psyco import bind [as 別名]
def _psyco_speedup():
	try:
		import psyco
		psyco.bind(preprocessor)
		psyco.bind(configure)
		psyco.bind(coremake)
		psyco.bind(emake)
		#print 'full optimaze'
	except:
		return False
	return True



#----------------------------------------------------------------------
# distribution
#---------------------------------------------------------------------- 
開發者ID:skywind3000,項目名稱:emake,代碼行數:19,代碼來源:emake.py

示例2: speedup

# 需要導入模塊: import psyco [as 別名]
# 或者: from psyco import bind [as 別名]
def speedup():
	try:
		import psyco
		psyco.bind(disjointset)
		psyco.bind(vector2d)
		psyco.bind(line2d)
		psyco.bind(savebmp)
	except ImportError:
		pass 
開發者ID:skywind3000,項目名稱:collection,代碼行數:11,代碼來源:gamelevel.py

示例3: psyco_speedup

# 需要導入模塊: import psyco [as 別名]
# 或者: from psyco import bind [as 別名]
def psyco_speedup ():
	try:
		import psyco
		psyco.bind(chessboard)
		psyco.bind(evaluation)
	except:
		pass
	return 0 
開發者ID:skywind3000,項目名稱:collection,代碼行數:10,代碼來源:gobang.py

示例4: __init__

# 需要導入模塊: import psyco [as 別名]
# 或者: from psyco import bind [as 別名]
def __init__(self, iterations=1000, distance=1.0, layout=LAYOUT_SPRING):
        super().__init__()
        self.__initialised = True

        self.nodes = []
        self.edges = []
        self.root = None

        # Calculates positions for nodes.
        self.layout = layout_.__dict__[layout+"_layout"](self, iterations)
        self.d = node(None).r * 2.5 * distance

        # Hover, click and drag event handler.
        self.events = event.events(self, _ctx)

        # Enhanced dictionary of all styles.
        self.styles = style.styles(self)
        self.styles.append(style.style(style.DEFAULT, _ctx))
        self.alpha = 0

        # Try to specialize intensive math operations.
        try:
            import psyco
            psyco.bind(self.layout._bounds)
            psyco.bind(self.layout.iterate)
            psyco.bind(self.__or__)
            psyco.bind(cluster.flatten)
            psyco.bind(cluster.subgraph)
            psyco.bind(cluster.clique)
            psyco.bind(cluster.partition)
            psyco.bind(proximity.dijkstra_shortest_path)
            psyco.bind(proximity.brandes_betweenness_centrality)
            psyco.bind(proximity.eigenvector_centrality)
            psyco.bind(style.edge_arrow)
            psyco.bind(style.edge_label)
            #print "using psyco"
        except:
            pass 
開發者ID:mediafactory,項目名稱:yats,代碼行數:40,代碼來源:__init__.py


注:本文中的psyco.bind方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。