本文整理汇总了Python中utils.doout.doout函数的典型用法代码示例。如果您正苦于以下问题:Python doout函数的具体用法?Python doout怎么用?Python doout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了doout函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: OnPathChange
def OnPathChange(self, path):
assert doout(value)
# FIXME: Should this check if the input is a real valid dir?
# Alternative the BindingString can be marked as read-only
# (need to develop) and only settable via a direct call to
# __set__
self.widget.SetPath(path)
开发者ID:mementum,项目名称:fritzchecksum,代码行数:7,代码来源:wxfb.py
示例2: __init__
def __init__(self, name, group=None, **kwargs):
self.group = group
if group is not None:
self._groups[group].append(self)
assert doout(name, kwargs)
BindingWidget.__init__(self, name, **kwargs)
开发者ID:mementum,项目名称:fritzchecksum,代码行数:7,代码来源:wxfb.py
示例3: load_package
def load_package(cls, package, reloading, results):
for modname in dir(package):
if modname.startswith('_'):
continue
mod = getattr(package, modname)
if not isinstance(mod, types.ModuleType):
continue
doout('checking', modname)
try:
reload(mod)
except ImportError, e:
results.append(e)
except Exception, e:
results.append(e)
开发者ID:mementum,项目名称:deldosdevices,代码行数:16,代码来源:mvc.py
示例4: OnValueChange
def OnValueChange(self, value):
assert doout(value)
newvalue = min(self.max, max(self.min, value))
if value != newvalue:
self._set('value', newvalue)
self.widget.SetValue(newvalue)
开发者ID:mementum,项目名称:fritzchecksum,代码行数:8,代码来源:wxfb.py
示例5: rd
def rd(self, bindname, obj):
assert doout()
if not self.doconfig:
return self.getdefault(obj)
rdfunc = getattr(self.config, self.rdattr)
value = rdfunc(bindname, self.getdefault(obj))
self.config.Flush()
return value
开发者ID:mementum,项目名称:fritzchecksum,代码行数:9,代码来源:wxfb.py
示例6: OnItemsChange
def OnItemsChange(self, value):
assert doout(value)
# FIXME: A more complex policy is needed to ensure that if
# string x is selected it remains selected after we clear the
# combobox or if for example the previous
self.widget.Clear()
self.widget.SetItems(value)
# make sure it's selected if possible
self.stringselection = self.stringselection
开发者ID:mementum,项目名称:fritzchecksum,代码行数:10,代码来源:wxfb.py
示例7: OnStringSelectionChange
def OnStringSelectionChange(self, value):
assert doout(value)
retval = self.widget.SetStringSelection(value)
# The variable must contain the reality and not what was sent,
# because the operation may fail if the "value" is not in the
# list of items (use _set to avoid an infinite loop)
self._set('stringselection', self.widget.GetStringSelection())
# No event was emitted ... manual selection update
self._set('selection', self.widget.GetSelection())
return retval
开发者ID:mementum,项目名称:fritzchecksum,代码行数:10,代码来源:wxfb.py
示例8: OnRadioButton
def OnRadioButton(self, event):
assert doout(event)
event.Skip()
# self.value = event.GetInt()
# This avoids a callback to
value = event.GetInt()
self._set('value', value)
# Manage the group
for radio in self._groups[self.group]:
if radio != self:
radio._set('value', not value)
开发者ID:mementum,项目名称:fritzchecksum,代码行数:12,代码来源:wxfb.py
示例9: findwidget
def findwidget(self):
assert doout()
if not self.wname:
self.wname = 'm_' + self.wprefix.lower() + self.name.lower()
for attr in dir(self.owner):
if attr.lower() == self.wname:
self.widget = getattr(self.owner, attr, None)
break
assert getattr(self, 'widget', None),\
'Failed to acquire widget - ' + self.wname
开发者ID:mementum,项目名称:fritzchecksum,代码行数:12,代码来源:wxfb.py
示例10: addcallback
def addcallback(self, callback):
assert doout(callback)
# im_self ensures if the object is not there it will not be found
bindname = self.makebindname(callback.im_self)
try:
self.callbacks[bindname][callback.im_self] = callback
except KeyError:
pass
else:
# Tell the callback the current value
# (it will for example check/uncheck a checkbox)
# callback(self.__get__(self, self.__class__))
callback(self.__get__(callback.im_self,
callback.im_self.__class__))
开发者ID:mementum,项目名称:fritzchecksum,代码行数:14,代码来源:wxfb.py
示例11: load_submodule
def load_submodule(cls, submod, reloading, results):
load_methods(cls, submod, reloading)
if hasattr(submod, '__package__'):
doout('submod.__package_', submod.__package__)
doout('submod.__name__', submod.__name__)
if submod.__package__ and submod.__package__ == submod.__name__:
doout('loading package', submod.__name__)
load_package(cls, submod, reloading, results)
开发者ID:mementum,项目名称:deldosdevices,代码行数:9,代码来源:mvc.py
示例12: __get__
def __get__(self, obj, cls=None):
assert doout(obj, cls)
if obj is None:
# this prevents early auto-setting if for example a
# decorator does a "dir" of the class attributes even
# before the registry object has been created and allows
# access to the object itself
return self
objbindname = self.makebindname(obj)
try:
return self.ncache[objbindname]
except KeyError:
value = self.rd(objbindname, obj)
value = self.postrd(value, obj)
self.ncache[objbindname] = value
return value
开发者ID:mementum,项目名称:fritzchecksum,代码行数:18,代码来源:wxfb.py
示例13: __set__
def __set__(self, obj, value, cb=True):
assert doout(obj, value)
objbindname = self.makebindname(obj)
try:
if self.ncache[objbindname] == value:
return
except KeyError:
pass
self.ncache[objbindname] = value
wrvalue = self.prewr(value)
self.wr(objbindname, wrvalue)
# self.config.Flush()
# Report to any callback
# if obj is not None:
if cb:
map(lambda callback: callback(value),
self.callbacks[objbindname].itervalues())
开发者ID:mementum,项目名称:fritzchecksum,代码行数:19,代码来源:wxfb.py
示例14: OnCheckBox
def OnCheckBox(self, event):
assert doout(event)
event.Skip()
# self.value = event.GetInt()
# This avoids a callback to
value = event.GetInt()
if self.group is not None:
if not value: # in a group and being set to False ... no
self.widget.SetValue(True)
if not self.value: # check the value
self._set('value', True)
else:
self._set('value', True)
# in a grou and being set to True
for checkbox in self._groups[self.group]:
if checkbox != self:
checkbox._set('value', False)
checkbox.widget.SetValue(False)
return
# Not in a group
self._set('value', value)
开发者ID:mementum,项目名称:fritzchecksum,代码行数:24,代码来源:wxfb.py
示例15: OnKillFocus
def OnKillFocus(self, event):
assert doout(event)
event.Skip()
self._set('value', self.widget.GetValue())
开发者ID:mementum,项目名称:fritzchecksum,代码行数:4,代码来源:wxfb.py
示例16: OnFilePickerChanged
def OnFilePickerChanged(self, event):
assert doout(event)
event.Skip()
# value can also be gotten from self.widget
self._set('path', event.GetPath())
开发者ID:mementum,项目名称:fritzchecksum,代码行数:5,代码来源:wxfb.py
示例17: OnSelectionChange
def OnSelectionChange(self, value):
assert doout(value)
self.widget.SetSelection(value)
开发者ID:mementum,项目名称:fritzchecksum,代码行数:3,代码来源:wxfb.py
示例18: OnTextChange
def OnTextChange(self, value):
assert doout(value)
self.widget.SetValue(value)
开发者ID:mementum,项目名称:fritzchecksum,代码行数:3,代码来源:wxfb.py
示例19: OnTextEnter
def OnTextEnter(self, event):
assert doout(event)
event.Skip()
self.value = event.GetString()
self.items.append(self.value)
self.stringselection = self.value
开发者ID:mementum,项目名称:fritzchecksum,代码行数:6,代码来源:wxfb.py
示例20: OnText
def OnText(self, event):
assert doout(event)
event.Skip()
self.value = event.GetString()
开发者ID:mementum,项目名称:fritzchecksum,代码行数:4,代码来源:wxfb.py
注:本文中的utils.doout.doout函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论