本文整理匯總了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)