def rm(path, verbose=True):
"""
Remove file or directory in path.
"""
if os.path.exists(path):
if verbose:
print('removing', path, end=' ')
if os.path.isdir(path):
for base, files, dirs in os.walk(path):
dirs_and_files = dirs + files
for path in dirs_and_files:
path = os.path.join(base, path)
rm(path, verbose=False)
else:
os.unlink(path)
if verbose:
print('...done!')
# @task
# def lint(ctx):
# """
# Run the linter
# """
# print('not ready...')
#
#
# @task
# def diagnose(ctx):
# print('not ready...')
#
#
# @task
# def publish(ctx):
# print('not ready...')
#
#
# @task
# def release(ctx):
# print('not ready...')
#
#
# @task
# def release_check(ctx):
# print('not ready...')
#
#
# @task
# def http_serve(ctx):
# print('not ready...')
评论列表
文章目录