本文整理汇总了Python中ShareYourSystem.getClassStrWithTypeStr方法的典型用法代码示例。如果您正苦于以下问题:Python ShareYourSystem.getClassStrWithTypeStr方法的具体用法?Python ShareYourSystem.getClassStrWithTypeStr怎么用?Python ShareYourSystem.getClassStrWithTypeStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShareYourSystem
的用法示例。
在下文中一共展示了ShareYourSystem.getClassStrWithTypeStr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: JoinerClass
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import getClassStrWithTypeStr [as 别名]
#<ImportSpecificModules>
import collections
import copy
import numpy
import tables
import os
import ShareYourSystem as SYS
import sys
#</ImportSpecificModules>
#<DefineLocals>
JoinStr='__'
JoinDeepStr='/'
BasingLocalTypeStr="Shaper"
BaseClass=getattr(SYS,SYS.getClassStrWithTypeStr(BasingLocalTypeStr))
#</DefineLocals>
#<DefineClass>
class JoinerClass(BaseClass):
@SYS.HookerClass(**{'AfterTuplesList':[(BaseClass,"init")]})
def init(self):
#<DefineSpecificDo>
self.JoinedOrderedDict=collections.OrderedDict() #<NotRepresented>
self.JoinedDatabasePointer=None #<NotRepresented>
#</DefineSpecificDo>
@SYS.HookerClass(**{'BeforeTuplesList':[("<TypeStr>","join")],'AfterTuplesList':[("Featurer","model")]})
def model(self,**_KwargVariablesDict):
示例2: model
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import getClassStrWithTypeStr [as 别名]
def model(self,_ModelStr="",**_DatabasingVariablesDict):
"""Call the Output<HookStr> methods and return self.OutputedPointer (self by default)"""
#debug
print('Modeler model method')
print('_ModelStr is ',_ModelStr)
print('')
#Reinit attributes
LocalOutputedPointer=self
if _ModelStr=="":
_ModelStr=self.DatabasedDict['ModelStr']
else:
self.DatabasedDict=self['App_Model_'+SYS.getDoingStrWithDoStr(_ModelStr)+'Dict']
if self.DatabasedDict!=None:
if 'IsDatabasedBool' not in self.DatabasedDict:
#set variables
IsDatabasedBool=False
ModelStr=_ModelStr
DatabasingStr=SYS.getDoingStrWithDoStr(ModelStr)
DatabasedStr=SYS.getDoneStrWithDoStr(ModelStr)
ModeledSuffixStr=SYS.getClassStrWithTypeStr(DatabasedStr+'Model')
DatabasedKeyStr=""
#Put them in the DatabasedDict
LocalVars=vars()
map(
lambda __GettingStr:
self.DatabasedDict.__setitem__(__GettingStr,LocalVars[__GettingStr]),
[
'IsDatabasedBool',
'ModelStr',
'DatabasingStr',
'DatabasedStr',
'ModeledSuffixStr',
'DatabasedKeyStr'
]
)
#set IsDatabasingBool
self.IsDatabasingBool=True
#Hook methods
for OrderStr in ["Before","After"]:
#Definition the HookMethodStr
HookingMethodStr='model'+OrderStr
#Check that there is HookingMethods for it
if HookingMethodStr in self.__class__.HookingMethodStrToMethodsListDict:
#Call the specific Appended methods
for HookingMethod in self.__class__.HookingMethodStrToMethodsListDict[HookingMethodStr]:
#Call the HookMethod
OutputVariable=HookingMethod(self,**_DatabasingVariablesDict)
if type(OutputVariable)==dict:
if 'LocalDatabasingVariablesDict' in OutputVariable:
LocalDatabasingVariablesDict=OutputVariable['LocalDatabasingVariablesDict']
if 'LocalOutputedPointer' in OutputVariable:
LocalOutputedPointer=OutputVariable['LocalOutputedPointer']
#Check Bool
if self.IsDatabasingBool==False:
return LocalOutputedPointer
#debug
print('END Modeler model method')
print('_ModelStr is ',_ModelStr)
print('')
#Return the OutputVariable
return LocalOutputedPointer