本文整理汇总了Python中mio.runtime.find函数的典型用法代码示例。如果您正苦于以下问题:Python find函数的具体用法?Python find怎么用?Python find使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了find函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: evalArg
def evalArg(self, receiver, context, m, *args):
if len(args) > 1:
return runtime.find("Tuple").clone(tuple(arg.eval(context) for arg in args))
elif len(args) == 1:
return args[0].eval(context)
else:
return runtime.find("None")
示例2: __init__
def __init__(self, value=u""):
super(String, self).__init__(value=value)
self.create_methods()
try:
self.parent = runtime.find("String")
except AttributeError:
self.parent = runtime.find("Object")
示例3: update_status
def update_status(self):
mode = self.value.mode
closed = self.value.closed
filename = self.value.name
self["mode"] = runtime.find("String").clone(mode)
self["filename"] = runtime.find("String").clone(filename)
if closed:
self["closed"] = runtime.find("True")
else:
self["closed"] = runtime.find("False")
示例4: __init__
def __init__(self):
super(System, self).__init__()
self["args"] = self.build_args()
self["version"] = runtime.find("String").clone((mio.__version__))
self["stdin"] = File(sys.stdin)
self["stdout"] = File(sys.stdout)
self["stderr"] = File(sys.stderr)
self.create_methods()
self.parent = runtime.find("Object")
示例5: __init__
def __init__(self):
super(Traits, self).__init__()
self.create_objects()
self.create_methods()
self.parent = runtime.find("Object")
示例6: _del
def _del(self, receiver, context, m, key):
key = unicode(key.eval(context))
value = receiver[key]
del receiver[key]
if isinstance(value, Object):
value.bindig = None
return runtime.find("None")
示例7: find
def find(self, receiver, context, m, sub, start=None, end=None):
sub = bytes(sub.eval(context))
start = int(start.eval(context)) if start is not None else None
end = int(end.eval(context)) if end is not None else None
return runtime.find("Number").clone(
receiver.value.find(sub, start, end)
)
示例8: __init__
def __init__(self):
super(Importer, self).__init__()
self["paths"] = self.build_paths()
self.create_methods()
self.parent = runtime.find("Object")
示例9: __init__
def __init__(self):
super(Module, self).__init__()
self.file = None
self.name = None
self.create_methods()
self.parent = runtime.find("Object")
示例10: __init__
def __init__(self):
super(Continuation, self).__init__()
self.context = None
self.message = None
self.create_methods()
self.parent = runtime.find("Object")
示例11: __init__
def __init__(self):
super(Trait, self).__init__()
self.requirements = []
self.create_methods()
self.parent = runtime.find(
"Trait" if self.__class__ is not Trait else "Object")
示例12: __init__
def __init__(self, path=None, expanduser=False):
super(Path, self).__init__()
path = posix.getcwdu() if path is None else path
self.value = posixpath.expanduser(path) if expanduser else path
self.create_methods()
self.parent = runtime.find("Object")
示例13: __init__
def __init__(self):
super(Error, self).__init__()
self["type"] = None
self["message"] = None
self.create_methods()
self.parent = runtime.find("Object")
示例14: __init__
def __init__(self):
super(Range, self).__init__()
self.start = None
self.stop = None
self.step = None
self.create_methods()
self.parent = runtime.find("Object")
示例15: __init__
def __init__(self):
super(State, self).__init__()
self.isContinue = False
self.isReturn = False
self.isBreak = False
self.create_methods()
self.parent = runtime.find("Object")