本文整理匯總了Python中PyOpenWorm.values方法的典型用法代碼示例。如果您正苦於以下問題:Python PyOpenWorm.values方法的具體用法?Python PyOpenWorm.values怎麽用?Python PyOpenWorm.values使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PyOpenWorm
的用法示例。
在下文中一共展示了PyOpenWorm.values方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: update_neurons_and_muscles_with_lineage_and_descriptions
# 需要導入模塊: import PyOpenWorm [as 別名]
# 或者: from PyOpenWorm import values [as 別名]
def update_neurons_and_muscles_with_lineage_and_descriptions():
v = P.values('neurons and muscles')
#XXX: This could be expensive...the lineage name and description should be loaded with
# the cell though.
cells = {next(x.name()) : (norn(x.lineageName()), norn(x.description())) for x in P.Cell().load() }
def dtt(x):
""" Do the thing """
try:
name = next(x.name())
if cells[name][0] is not None:
x.lineageName(cells[name][0])
if cells[name][1] is not None:
x.description(cells[name][1])
v.value(x)
except:
traceback.print_exc()
for x in P.Neuron().load():
dtt(x)
for x in P.Muscle().load():
dtt(x)
v.save()