本文整理汇总了Python中Client.checkForUpdates方法的典型用法代码示例。如果您正苦于以下问题:Python Client.checkForUpdates方法的具体用法?Python Client.checkForUpdates怎么用?Python Client.checkForUpdates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client.checkForUpdates方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: import Client [as 别名]
# 或者: from Client import checkForUpdates [as 别名]
# encoding: utf-8
#
# $Id$
#
import Client
from sys import argv
from pprint import pprint
if len(argv) > 1:
globals().update(Client.initializeClient(argv[1]))
else:
globals().update(Client.initializeClient())
if Client.checkForUpdates():
# updated version available
globals()["updated"] = True
else:
globals()["updated"] = False
# the "grace" is a single varId that is
# to be kept from the gc.
# the reason why is because the GC is performed just after a
# create operation. If such creation hasn't been asigned to any
# variable, it'd be gc'd, but then the interpreter wouldn't
# be able to show it's value, raising an exception
def _runGC(grace):
global clientId
usedSlots = [grace]