Google Colab 基本操作

## 上传

from google.colab import files

uploaded = files.upload()

for fn in uploaded.keys():
  print('User uploaded file "{name}" with length {length} bytes'.format(
      name=fn, length=len(uploaded[fn])))

 

## 下载

from google.colab import files

with open('example.txt', 'w') as f:
  f.write('some content')

files.download('example.txt')

 

上一篇:PHP在使用move_uploaded_file函数移动文件时一直失败


下一篇:AjaxControlToolkit的安装步骤