本文整理汇总了Python中ShareYourSystem.deprefix方法的典型用法代码示例。如果您正苦于以下问题:Python ShareYourSystem.deprefix方法的具体用法?Python ShareYourSystem.deprefix怎么用?Python ShareYourSystem.deprefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShareYourSystem
的用法示例。
在下文中一共展示了ShareYourSystem.deprefix方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: mimic_set
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def mimic_set(self):
""" """
#debug
'''
self.debug(('self.',self,['SettingKeyVariable','SettingValueVariable']))
'''
#Check
if type(self.SettingKeyVariable
)==str:
#Check
if self.SettingKeyVariable.startswith(AttributionInstancePrefixStr):
#debug
'''
self.debug('We are going to attribute to the instance')
'''
#Path
self.attribute(
SYS.deprefix(
self.SettingKeyVariable,
AttributionInstancePrefixStr
),
self.SettingValueVariable,
_InstanceBool=True,
_ClassBool=False
)
#Stop the setting
return {'HookingIsBool':False}
elif self.SettingKeyVariable.startswith(AttributionClassPrefixStr):
#debug
'''
self.debug('We are going to attribute to the class')
'''
#Path
self.attribute(
SYS.deprefix(
self.SettingKeyVariable,
AttributionClassPrefixStr
),
self.SettingValueVariable,
_InstanceBool=False,
_ClassBool=True,
)
#Stop the setting
return {'HookingIsBool':False}
#Set and return
return BaseClass.set(self)
示例2: mimic_get
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def mimic_get(self):
#Check
if type(self.GettingKeyVariable)==str:
#Check
if self.GettingKeyVariable.startswith(ConnectGetSetPrefixStr):
#debug
'''
self.debug(
[
'We get connect here',
('self.',self,['GettingKeyVariable'])
]
)
'''
#connect
self.connect(
SYS.deprefix(
self.GettingKeyVariable,
ConnectGetSetPrefixStr
)
)
#return
return {'HookingIsBool':False}
#set
BaseClass.get(self)
示例3: mimic_set
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def mimic_set(self):
#Definition
OutputDict={'HookingIsBool':True}
#debug
'''
self.debug(('self.',self,['SettingKeyVariable']))
'''
#Check
if type(
self.SettingKeyVariable
)==str and self.SettingKeyVariable.startswith(TeamChildPrefixStr):
#debug
'''
self.debug('We team here')
'''
#team
self.team(
SYS.deprefix(
self.SettingKeyVariable,
TeamChildPrefixStr
),
self.SettingValueVariable
)
#Stop the setting
OutputDict["HookingIsBool"]=False
#Call the parent get method
if OutputDict['HookingIsBool']:
return BaseClass.set(self)
示例4: mimic_get
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def mimic_get(self):
#get
if type(self.GettingKeyVariable
)==str:
#Check
if self.GettingKeyVariable.startswith(AttributionInstancePrefixStr):
#debug
'''
self.debug('We are going to get into the instance')
'''
#get
self.GettedValueVariable=self.__dict__[
SYS.deprefix(
self.GettingKeyVariable,
AttributionInstancePrefixStr
)
]
#Stop the setting
return {'HookingIsBool':False}
elif self.GettingKeyVariable.startswith(AttributionClassPrefixStr):
#debug
'''
self.debug('We are going to get from the class')
'''
#Path
self.GettedValueVariable=self.__class__.__dict__[
SYS.deprefix(
self.GettingKeyVariable,
AttributionClassPrefixStr
)
]
#Stop the setting
return {'HookingIsBool':False}
#return
return BaseClass.get(self)
示例5: mimic_get
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def mimic_get(self):
#Definition
OutputDict={'HookingIsBool':True}
#debug
'''
self.debug(('self.',self,['GettingKeyVariable']))
'''
#Check
if self.GettingKeyVariable==TeamParentManagerPrefixStr+'Manager':
#alias
self.GettedValueVariable=self.ManagementPointDeriveManager
#Stop the setting
OutputDict["HookingIsBool"]=False
#Check
if self.GettingKeyVariable==Manager.ManagementParentTeamerPrefixStr+'Teamer':
#alias
if self.ManagementPointDeriveManager!=None:
self.GettedValueVariable=self.ManagementPointDeriveManager.TeamPointDeriveTeamer
else:
self.GettedValueVariable=None
#Stop the setting
OutputDict["HookingIsBool"]=False
#Check
elif type(
self.GettingKeyVariable
)==str and self.GettingKeyVariable.startswith(TeamChildPrefixStr):
#debug
'''
self.debug('We team here')
'''
#team
self.GettedValueVariable=self.team(
SYS.deprefix(
self.GettingKeyVariable,
TeamChildPrefixStr
)
).TeamedValueVariable
#Stop the setting
OutputDict["HookingIsBool"]=False
#Call the parent get method
if OutputDict['HookingIsBool']:
return BaseClass.get(self)
示例6: mimic_get
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def mimic_get(self):
# Check
if type(self.GettingKeyVariable) == str:
# Check
if self.GettingKeyVariable.startswith(ProcessPrefixStr):
# deprefix
GetProcessBashStr = SYS.deprefix(self.GettingKeyVariable, ProcessPrefixStr)
# process
self.process(GetProcessBashStr)
# set
self.GettedValueVariable = self.ProcessedBashStr
# stop
return {"HookingIsBool": False}
# Cal the base method
BaseClass.get(self)
示例7: do_get
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
#.........这里部分代码省略.........
#Stop the getting
return {"HookingIsBool":False}
#/############################
# Cases of a key str get
#
#Check
if type(self.GettingKeyVariable) in [str,unicode]:
#debug
'''
self.debug(
[
'This is a non method get',
('self.',self,[
'GettingKeyVariable',
'GettingNewBool'
])
]
)
'''
'''
#/############################
# Case of a delete in the instance __dict__
#
if self.GettingKeyVariable.startswith(GetDeletePrefixStr)
#delete
del self.__dict__[
SYS.deprefix(
self.GettingKeyVariable,
GetDeletePrefixStr
)
]
#Stop the getting
return {"HookingIsBool":False}
'''
#/############################
# Case of a direct str get
#
if self.GettingKeyVariable.startswith(GetDirectPrefixStr):
#debug
'''
self.debug('This is a direct get of a str variable')
'''
#set
self.GettedValueVariable=SYS.deprefix(
self.GettingKeyVariable,
GetDirectPrefixStr
)
#Stop the getting
return {"HookingIsBool":False}
#/############################
# Case of a call str get
#
示例8: do_set
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
#.........这里部分代码省略.........
#debug
'''
self.debug('call the SettedValueMethod with self.SettingValueVariable directly')
'''
#direct
#SettedValueMethod(*self.SettingValueVariable)
SettedValueMethod(self.SettingValueVariable)
#debug
#Stop the setting
return {"HookingIsBool":False}
#/####################/#
# Case of a non method with set with a set key str
#
elif type(self.SettingKeyVariable
)==str:
#/####################/#
# Case of #each: set
#
#Check
if self.SettingKeyVariable.startswith(
SetEachPrefixStr
):
#get
SettedGetVariable=self[
SYS.deprefix(
self.SettingKeyVariable,
SetEachPrefixStr
)
]
#Check
if hasattr(SettedGetVariable,'values'):
SettedGetVariablesList=SettedGetVariable.values()
else:
SettedGetVariablesList=SettedGetVariable
#debug
'''
self.debug(
[
'SettedGetVariablesList is ',
SYS._str(SettedGetVariablesList),
('self.',self,['SettingValueVariable'])
]
)
'''
#map
map(
lambda __SettedGetVariable,__SettedValueVariable:
__SettedGetVariable.set(
*__SettedValueVariable
)
if type(__SettedValueVariable) in [
list,tuple
] and len(__SettedValueVariable)==2
else
示例9: mimic_set
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
#.........这里部分代码省略.........
self.PyplotedAxesVariable,
__ArgumentTuple[0]
)(**__ArgumentTuple[1]['KwargVariablesDict'])
if len(__ArgumentTuple[1]['LiargVariablesList']
)==0
else(
SYS.get(
self.PyplotedAxesVariable,
__ArgumentTuple[0]
)(
*__ArgumentTuple[1]['LiargVariablesList'],
**__ArgumentTuple[1]['KwargVariablesDict']
)
if __ArgumentTuple[1]['KwargVariablesDict']!=None
else
SYS.get(
self.PyplotedAxesVariable,
__ArgumentTuple[0]
)(
*__ArgumentTuple[1]['LiargVariablesList']
)
)
),
ArgumentTuplesList
)
#return
return {'HookingIsBool':False}
elif type(self.SettingKeyVariable)==str and self.SettingKeyVariable.startswith(
PyplotMpld3KeyStr):
#deprefix
ToolTipKeyStr=SYS.deprefix(
self.SettingKeyVariable,
PyplotMpld3KeyStr
)
#debug
'''
self.debug(
[
'before plugins',
('self.',self,['PyplotedParentFigureDerivePyploterVariable'])
]
)
'''
#init
PyplotPluginArgumentDict=Setter.ArgumentDict(
self.SettingValueVariable,
self.PyplotedParentFigureDerivePyploterVariable
)
#debug
'''
self.debug(
[
'We plugin here',
'PyplotPluginArgumentDict is ',
SYS._str(PyplotPluginArgumentDict)
]
)
'''
#plugin
示例10: recordTrace
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def recordTrace(self):
#/###################/#
# Traces level
#
#debug
"""
self.debug(
[
'This is the Traces level',
'First get the array to trace',
('self.',self,[
'RecordingKeyVariable'
])
]
)
"""
#get
RecordedTopDeriveRecorderVariable=self.ParentDeriveTeamerVariable.ParentDeriveTeamerVariable
#/##################/#
# First get the array to trace
#
#get
if type(self.RecordingKeyVariable)==None.__class__:
#Check
if RecordPrefixStr!="" and self.ManagementTagStr.startswith(RecordPrefixStr):
#debug
'''
self.debug(
[
('self.',self,['ManagementTagStr']),
'RecordedTopDeriveRecorderVariable is '+str(RecordedTopDeriveRecorderVariable)
]
)
'''
#get
self.RecordedTraceFloatsArray=getattr(
RecordedTopDeriveRecorderVariable,
SYS.deprefix(
self.ManagementTagStr,
RecordPrefixStr
)
)
elif type(self.RecordingKeyVariable).__name__!='ndarray':
#get
self.RecordedTraceFloatsArray=RecordedTopDeriveRecorderVariable[
self.RecordingKeyVariable
]
else:
#alias
self.RecordedTraceFloatsArray=self.RecordingKeyVariable
#alias
if self.RecordKeyStr=="":
self.RecordKeyStr=str(self.RecordingKeyVariable)
#debug
'''
self.debug(
[
'We have getted the RecordedTraceFloatsArray',
('self.',self,['RecordedTraceFloatsArray']),
'Now set the init'
]
)
'''
#Check
if type(self.RecordedTraceFloatsArray)!=None.__class__:
#/##################/#
# Prepare initial conditions
# with the Matrixer
#Check
if type(self.RecordingInitFloatsArray)==None.__class__:
#debug
'''
self.debug(
[
'We prepare the initial conditions',
'len(self.RecordedTraceFloatsArray) is ',
str(len(self.RecordedTraceFloatsArray)),
('self.',self,[
'NumscipyingStdFloat',
'NumscipyingMeanFloat',
'RecordedTraceFloatsArray'
])
#.........这里部分代码省略.........
示例11: mimic_set
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def mimic_set(self):
#Definition
OutputDict={'HookingIsBool':True}
#debug
'''
self.debug(('self.',self,['SettingKeyVariable']))
'''
#Check
if type(
self.SettingKeyVariable
)==str:
#Check
if self.SettingKeyVariable.startswith(
ManagementDirectChildPrefixStr
):
#debug
'''
self.debug(
[
'We manage here without instancing',
('self.',self,['SettingKeyVariable'])
]
)
'''
#manage
self.manage(
SYS.deprefix(
self.SettingKeyVariable,
ManagementDirectChildPrefixStr
),
self.SettingValueVariable,
_WrapBool=False
)
self.ManagingWrapBool=True
#Stop the setting
return {'HookingIsBool':False}
elif self.SettingKeyVariable.startswith(
ManagementChildPrefixStr
):
#debug
'''
self.debug('We manage here')
'''
#manage
self.manage(
SYS.deprefix(
self.SettingKeyVariable,
ManagementChildPrefixStr
),
self.SettingValueVariable
)
#Stop the setting
return {'HookingIsBool':False}
#debug
'''
self.debug(
[
'Call the base set method',
'BaseClass is '+str(BaseClass),
('self.',self,['SettingKeyVariable'])
]
)
'''
#return
return BaseClass.set(self)
示例12: mimic_get
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def mimic_get(self):
#debug
'''
self.debug(
('self.',self,[
'GettingKeyVariable',
])
)
'''
#Check
if type(self.GettingKeyVariable)==str:
#Check
if self.GettingKeyVariable.startswith(
PointToStr
):
#debug
'''
self.debug(
'we point here'
)
'''
#point
self.point(
SYS.deprefix(
self.GettingKeyVariable,
PointToStr
)
)
#alias
self.GettedValueVariable=self.PointedToVariable
#return
return {'HookingIsBool':False}
elif self.GettingKeyVariable.startswith(
PointBackStr
):
#debug
'''
self.debug(
'we back point here'
)
'''
#point
self.point(
SYS.deprefix(
self.GettingKeyVariable,
PointBackStr
),
_BackBool=True
)
#alias
self.GettedValueVariable=self.PointedToVariable
#return
return {'HookingIsBool':False}
elif self.GettingKeyVariable.startswith(
PointPrefixStr
):
#debug
'''
self.debug(
'we get the encapsulate variable'
)
'''
#deprefix
PointGetKeyStr=SYS.deprefix(
self.GettingKeyVariable,
PointPrefixStr
)
#get
self.GettedValueVariable=self[PointGetKeyStr]['PointToVariable']
#return
return {'HookingIsBool':False}
#call the base method
return BaseClass.get(self)
示例13: mimic_set
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def mimic_set(self):
#Check
if type(self.SettingKeyVariable)==str:
#Check
if self.SettingKeyVariable.startswith(ConnectGetSetPrefixStr):
if type(
self.SettingValueVariable
)==list and SYS.getIsTuplesListBool(self.SettingValueVariable
)==False and len(self.SettingValueVariable)==2:
#debug
'''
self.debug(
[
'We set connect here',
('self.',self,['SettingKeyVariable'])
]
)
'''
#connect
self.connect(
SYS.deprefix(
self.SettingKeyVariable,
ConnectGetSetPrefixStr
),
self.SettingValueVariable[0],
self.SettingValueVariable[1]
)
#return
return {'HookingIsBool':False}
else:
#debug
'''
self.debug(
[
'We set connect back here',
('self.',self,['SettingKeyVariable'])
]
)
'''
#connect
self.connect(
SYS.deprefix(
self.SettingKeyVariable,
ConnectGetSetPrefixStr
),
self.SettingValueVariable
)
#return
return {'HookingIsBool':False}
#set
BaseClass.set(self)
示例14: do__class
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
#.........这里部分代码省略.........
#filter
ClassedPropertyNewMethodDict=dict(
SYS._filter(
lambda __MethodItemTuple:
__MethodItemTuple[0].startswith(
Propertiser.PropertyPrefixStr
) and (
SYS.getNewMethodBool(self.DoClass,__MethodItemTuple[0])
#getattr(
# self.DoClass.__bases__[0],
# __MethodItemTuple[0]
#)!=__MethodItemTuple[1]
#if hasattr(self.DoClass.__bases__[0],
# __MethodItemTuple[0]
#) else True
),
self.DoClass.InspectMethodDict.items()
)
)
#Debug
'''
print('Classer l 147')
print('self.DoClass is ')
print(self.DoClass)
print('ClassedPropertyNewMethodDict is')
print(SYS.indent(ClassedPropertyNewMethodDict))
print('')
'''
#map
ClassedPropertyKeyStrsList=map(
lambda __PropertizedKeyStr:
SYS.deprefix(
__PropertizedKeyStr,
Propertiser.PropertyPrefixStr
)[3:],
ClassedPropertyNewMethodDict.keys()
)
#map reset the properties
map(
lambda __PropertyKeyStr:
setattr(
self.DoClass,
__PropertyKeyStr,
property(
getattr(
self.DoClass,
Propertiser.PropertyPrefixStr+'get'+__PropertyKeyStr
),
getattr(
self.DoClass,
Propertiser.PropertyPrefixStr+'set'+__PropertyKeyStr
),
getattr(
self.DoClass,
Propertiser.PropertyPrefixStr+'del'+__PropertyKeyStr
)
)
),
ClassedPropertyKeyStrsList
)
#/###################/#
# Set maybe a structure
示例15: mimic_set
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import deprefix [as 别名]
def mimic_set(self):
#Check
if type(self.SettingKeyVariable)==str and self.SettingKeyVariable.startswith(
ParentMutePrefixStr
):
#deprefix
MuteGetKeyStr=SYS.deprefix(
self.SettingKeyVariable,
ParentMutePrefixStr
)
#get
MuteGetValueVariable=self[MuteGetKeyStr]
#init
#MuteSetValueVariable=self.SettingValueVariable()['#[email protected]'](
# MuteGetValueVariable.__dict__
#)
MuteSetValueVariable=self.SettingValueVariable()
MuteSetValueVariable.__dict__=MuteGetValueVariable.__dict__
#debug
'''
self.debug(
[
'We are going to mute...',
'MuteGetKeyStr is '+str(MuteGetKeyStr),
'MuteGetValueVariable.TeamTagStr is '+str(MuteGetValueVariable.TeamTagStr),
'MuteGetValueVariable.ManagementTagStr is '+str(MuteGetValueVariable.ManagementTagStr),
('self.',self,['SettingValueVariable']),
'MuteSetValueVariable is ',
SYS._str(MuteSetValueVariable)
]
)
'''
#Check
if MuteGetValueVariable.ParentDeriveTeamerVariable.TeamedOnceBool:
#debug
'''
self.debug(
'We team again'
)
'''
#del
del MuteGetValueVariable.ParentDeriveTeamerVariable.TeamDict[
MuteGetValueVariable.TeamTagStr
]
#team again
MuteGetValueVariable.ParentDeriveTeamerVariable.team(
MuteGetValueVariable.TeamTagStr,
MuteSetValueVariable
)
#return
return {'HookingIsBool':False}
else:
#debug
'''
self.debug(
'We manage again'
)
'''
#del
del MuteGetValueVariable.ParentDeriveTeamerVariable.ManagementDict[
MuteGetValueVariable.ManagementTagStr
]
#manage again
MuteGetValueVariable.ParentDeriveTeamerVariable.manage(
MuteGetValueVariable.ManagementTagStr,
MuteSetValueVariable
)
#return
return {'HookingIsBool':False}
#Call the base method
BaseClass.set(self)