本文整理汇总了Python中package.Package.installTime方法的典型用法代码示例。如果您正苦于以下问题:Python Package.installTime方法的具体用法?Python Package.installTime怎么用?Python Package.installTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类package.Package
的用法示例。
在下文中一共展示了Package.installTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: open
# 需要导入模块: from package import Package [as 别名]
# 或者: from package.Package import installTime [as 别名]
##########################################
# Main Loop #
##########################################
with open(CONFIG_FILE, "r") as f:
for name in f:
pack = Package() # create new Package Object
pack.name = name.strip()
respString = getHttpResponseString(pack.name)
pack.updateTime = parseDateString(getUpdateTime(respString))
pack.gitPath = AUR_CLONE_URL + pack.name + ".git"
pack.localPath = CLONE_PATH + pack.name + "/PKGBUILD"
if os.path.isfile(pack.localPath):
pack.installTime = os.path.getmtime(pack.localPath)
timeDif = pack.updateTime - pack.installTime
else:
clonePackage(pack)
exit()
if debug == True:
print("{}, {}".format(pack.name, pack.updateTime))
print("{}".format(pack.updateTime))
print("Git Path: {}".format(pack.gitPath))
print("{} last modified local: {}".format(pack.name, pack.installTime))
print("file time dif = {}".format(timeDif))
#else:
# os.system('clear')