本文整理匯總了Python中pychess.ic.ICLogon.get_user_names方法的典型用法代碼示例。如果您正苦於以下問題:Python ICLogon.get_user_names方法的具體用法?Python ICLogon.get_user_names怎麽用?Python ICLogon.get_user_names使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pychess.ic.ICLogon
的用法示例。
在下文中一共展示了ICLogon.get_user_names方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: user_name_get_value
# 需要導入模塊: from pychess.ic import ICLogon [as 別名]
# 或者: from pychess.ic.ICLogon import get_user_names [as 別名]
def user_name_get_value(entry):
names = ICLogon.get_user_names()
if as_guest.get_active():
text = "%s|%s" % (names[0], entry.get_text())
else:
text = "%s|%s" % (entry.get_text(), names[1])
return text
示例2: user_name_set_value
# 需要導入模塊: from pychess.ic import ICLogon [as 別名]
# 或者: from pychess.ic.ICLogon import get_user_names [as 別名]
def user_name_set_value(entry, value):
names = ICLogon.get_user_names(value=value)
if as_guest.get_active():
entry.set_text(names[1])
else:
entry.set_text(names[0])
示例3: asGuestCallback
# 需要導入模塊: from pychess.ic import ICLogon [as 別名]
# 或者: from pychess.ic.ICLogon import get_user_names [as 別名]
def asGuestCallback(check):
names = ICLogon.get_user_names()
self.widgets["usernameEntry"].set_text(names[1] \
if check.get_active() else names[0])
self.widgets["passwordLabel"].set_sensitive(not check.get_active())
self.widgets["passwordEntry"].set_sensitive(not check.get_active())