本文整理汇总了Python中conda.history.History.object_log方法的典型用法代码示例。如果您正苦于以下问题:Python History.object_log方法的具体用法?Python History.object_log怎么用?Python History.object_log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类conda.history.History
的用法示例。
在下文中一共展示了History.object_log方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: execute
# 需要导入模块: from conda.history import History [as 别名]
# 或者: from conda.history.History import object_log [as 别名]
def execute(args, parser):
prefix = context.prefix_w_legacy_search
regex = args.regex
if args.full_name:
regex = r'^%s$' % regex
if args.revisions:
from conda.history import History
h = History(prefix)
if isfile(h.path):
if not context.json:
h.print_log()
else:
stdout_json(h.object_log())
else:
raise CondaFileNotFoundError(h.path)
return
if args.explicit:
print_explicit(prefix, args.md5)
return
if args.canonical:
format = 'canonical'
elif args.export:
format = 'export'
else:
format = 'human'
if context.json:
format = 'canonical'
exitcode = print_packages(prefix, regex, format, piplist=args.pip,
json=context.json,
show_channel_urls=context.show_channel_urls)
return exitcode
示例2: execute
# 需要导入模块: from conda.history import History [as 别名]
# 或者: from conda.history.History import object_log [as 别名]
def execute(args, parser):
prefix = common.get_prefix(args)
regex = args.regex
if args.full_name:
regex = r'^%s$' % regex
if args.revisions:
from conda.history import History
h = History(prefix)
if isfile(h.path):
if not args.json:
h.print_log()
else:
common.stdout_json(h.object_log())
else:
common.error_and_exit("No revision log found: %s\n" % h.path,
json=args.json,
error_type="NoRevisionLog")
return
if args.canonical:
format = 'canonical'
elif args.export:
format = 'export'
else:
format = 'human'
if args.json:
format = 'canonical'
exitcode = print_packages(prefix, regex, format, piplist=args.pip, json=args.json)
sys.exit(exitcode)
示例3: execute
# 需要导入模块: from conda.history import History [as 别名]
# 或者: from conda.history.History import object_log [as 别名]
def execute(args, parser):
prefix = common.get_prefix(args)
if args.revisions:
from conda.history import History
h = History(prefix)
if isfile(h.path):
if not args.json:
h.print_log()
else:
common.stdout_json(h.object_log())
else:
common.error_and_exit("No revision log found: %s\n" % h.path, json=args.json, error_type="NoRevisionLog")
return
if args.canonical:
format = "canonical"
elif args.export:
format = "export"
else:
format = "human"
if args.json:
format = "canonical"
print_packages(prefix, args.regex, format, piplist=args.pip, json=args.json)