本文整理匯總了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
#----------------------------------------------------------------------
示例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
示例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
示例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