当前位置: 首页>>代码示例>>Python>>正文


Python ShareYourSystem.getClassStrWithTypeStr方法代码示例

本文整理汇总了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):
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:32,代码来源:Joiner+copy+5.py

示例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
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:77,代码来源:Modeler+copy.py


注:本文中的ShareYourSystem.getClassStrWithTypeStr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。