本文整理汇总了Python中timedops.TimedOperation._set_lock方法的典型用法代码示例。如果您正苦于以下问题:Python TimedOperation._set_lock方法的具体用法?Python TimedOperation._set_lock怎么用?Python TimedOperation._set_lock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类timedops.TimedOperation
的用法示例。
在下文中一共展示了TimedOperation._set_lock方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _on_authentication_response
# 需要导入模块: from timedops import TimedOperation [as 别名]
# 或者: from timedops.TimedOperation import _set_lock [as 别名]
self._on_authentication_response (d, response)
def _on_authentication_response (self, dialog, response):
(user, self._use_password) = dialog.get_auth_info ()
if user != '':
self._use_user = user
global_authinfocache.cache_auth_info ((self._use_user,
self._use_password),
host=self._server,
port=self._port)
dialog.destroy ()
if (response == Gtk.ResponseType.CANCEL or
response == Gtk.ResponseType.DELETE_EVENT):
self._cancel = True
if self._lock:
self._gui_event.set ()
if __name__ == '__main__':
# Test it out.
Gdk.threads_init ()
from timedops import TimedOperation
set_debugging (True)
c = TimedOperation (Connection, args=(None,)).run ()
debugprint ("Connected")
c._set_lock (True)
print(TimedOperation (c.getFile,
args=('/admin/conf/cupsd.conf',
'/dev/stdout')).run ())