【发布时间】:2022-11-12 01:31:25
【问题描述】:
我想使用 AWS 终端命令同步 Jupyter 笔记本的输出:
aws s3 sync <local_path> <s3://<bucket>/destination_path>
但是,如果可能,我想将此命令放入 try/except 块中。我正在尝试执行以下操作:
try:
!aws s3 sync <local_path> <s3://<bucket>/destination_path>
except Exception as e:
print(e)
我知道这行不通,但是有没有办法实现这个目标?
【问题讨论】:
标签: python amazon-s3 jupyter-notebook