def cli(problem, path):
"""
Generate the resource files for problems.
These resources are either images - serving as helpful illustrations -
or text files containing specific data - referenced in the problem.
If the PROBLEM argument isn't specified, all resources will be
generated.
"""
if problem is None:
resources = os.listdir('%s/resources' % paths.DATA)
else:
if 'resources' not in problem:
sys.exit('Problem %s has no resource files' % problem['id'])
resources = problem['resources']
generate_resources(resources, path)
评论列表
文章目录