本文整理汇总了Python中evaluator.Evaluator.locals_['self']方法的典型用法代码示例。如果您正苦于以下问题:Python Evaluator.locals_['self']方法的具体用法?Python Evaluator.locals_['self']怎么用?Python Evaluator.locals_['self']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类evaluator.Evaluator
的用法示例。
在下文中一共展示了Evaluator.locals_['self']方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: wait_for_completion
# 需要导入模块: from evaluator import Evaluator [as 别名]
# 或者: from evaluator.Evaluator import locals_['self'] [as 别名]
# Timestamps have been specified. Non-interactive version.
s.enqueue( *(long(t) for t in sys.argv[2:]) )
loop=gobject.MainLoop()
def wait_for_completion():
if s.timestamp_queue.empty():
# Quit application
s.snapshot_ready.wait()
loop.quit()
return True
gobject.idle_add(wait_for_completion)
loop.run()
else:
if Evaluator is None:
print "Missing evaluator module.\nFetch it from http://svn.gna.org/viewcvs/advene/trunk/lib/advene/gui/evaluator.py."
sys.exit(0)
# Adding the following lines breaks the code, with a warning:
# sys:1: Warning: cannot register existing type `GstSelectorPad'
# sys:1: Warning: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
#pipe=gst.parse_launch('playbin uri=file:///media/video/Bataille.avi')
#pipe.set_state(gst.STATE_PLAYING)
ev=Evaluator(globals_=globals(), locals_=locals())
ev.locals_['self']=ev
window=ev.popup(embedded=False)
ev.set_expression('s.enqueue(12000, 24000, 36000)')
window.connect ("destroy", lambda e: gtk.main_quit())
gtk.main()