本文整理匯總了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:]