本文整理汇总了Python中openalea.core.pkgmanager.PackageManager.get方法的典型用法代码示例。如果您正苦于以下问题:Python PackageManager.get方法的具体用法?Python PackageManager.get怎么用?Python PackageManager.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openalea.core.pkgmanager.PackageManager
的用法示例。
在下文中一共展示了PackageManager.get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __call__
# 需要导入模块: from openalea.core.pkgmanager import PackageManager [as 别名]
# 或者: from openalea.core.pkgmanager.PackageManager import get [as 别名]
def __call__(self, inputs):
""" inputs is the list of input values
:param inputs: a package name
:returns: path of the package wralea
"""
pname = str(inputs[0])
from openalea.core.pkgmanager import PackageManager
pm = PackageManager()
pkg = pm.get(pname)
p = ''
if pkg:
p = pkg.path
return (p, )
示例2: __call__
# 需要导入模块: from openalea.core.pkgmanager import PackageManager [as 别名]
# 或者: from openalea.core.pkgmanager.PackageManager import get [as 别名]
def __call__(self, inputs):
"""
:param inputs: list of input values
:returns: The Path of the package wralea
"""
print "This node is DEPRECATED. Use %s instead" % \
"Catalog.File.PackageDir"
pname = str(inputs[0])
from openalea.core.pkgmanager import PackageManager
pm = PackageManager()
pkg = pm.get(pname)
path = ''
if pkg :
path = pkg.path
return (path, )
示例3: PackageManager
# 需要导入模块: from openalea.core.pkgmanager import PackageManager [as 别名]
# 或者: from openalea.core.pkgmanager.PackageManager import get [as 别名]
import os
import IOtable
import math
from os.path import join
from openalea.core.pkgmanager import PackageManager
pm = PackageManager()
pkg = pm.get('alinea.adel.adelMons')
path = ''
if pkg :
path = pkg.path
path_ini = os.getcwd()
def t_list(tab):
"""transpose tab"""
res = []
for j in range(len(tab[0])):
v = []
for i in range(len(tab)):
v.append(tab[i][j])
res.append(v)
return res
def conv_dataframe(tab):
""" converti liste de liste en dictionnaire; prend la cle comme le pemier element de la liste"""
dat = {}
for i in range(len(tab)):
dat[str(tab[i][0])] = tab[i][1:]