예제 #1
0
 def dir_context(context, engine):
     if context.argumentCount() == 0:
         obj = context.thisObject()
     else:
         obj = context.argument(0)
     l = []
     it = QScriptValueIterator(obj)
     while it.hasNext():
         it.next()
         l.append(str(it.name()))
     return QScriptValue(engine, repr(l))
예제 #2
0
def iter_js_obj(js_obj):
    """QScriptValueIterator to python iterator emitting tuples of (str, QScriptValue)"""
    it = QScriptValueIterator(js_obj)

    while it.hasNext():
        it.next()
        yield (it.name(), it.value())
예제 #3
0
파일: console.py 프로젝트: moceap/scribus
 def dir_context(context, engine):
     if context.argumentCount() == 0:
         obj = context.thisObject()
     else:
         obj = context.argument(0)
     l = []
     it = QScriptValueIterator(obj)
     while it.hasNext():
         it.next()
         l.append(str(it.name()))
     return QScriptValue(engine, repr(l))
예제 #4
0
파일: console.py 프로젝트: moceap/scribus
 def iter_obj(self, obj):
     it = QScriptValueIterator(self.engine.globalObject())
     while it.hasNext():
         yield str(it.name())
         it.next()
예제 #5
0
 def iter_obj(self, obj):
     it = QScriptValueIterator(self.engine.globalObject())
     while it.hasNext():
         yield str(it.name())
         it.next()