本文整理汇总了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