将文件写入阿里云oss的操作
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 15 10:54:53 2018
@author: myhaspl
@email:myhaspl@myhaspl.com
阿里云写文件入oss
oss://myhaspl-ai.oss-cn-beijing-internal.aliyuncs.com/
"""
import tensorflow as tf
with tf.Session() as sess:
with tf.gfile.GFile("oss://myhaspl-ai.oss-cn-beijing-internal.aliyuncs.com/ai_log.txt","wb") as f:
f.write("dadsfddasf")