小编Tod*_*odd的帖子

在不改变目录的情况下写入Python中的新目录

目前,我有以下代码......

file_name = content.split('=')[1].replace('"', '') #file, gotten previously
fileName = "/" + self.feed + "/" + self.address + "/" + file_name #add folders 
output = open(file_name, 'wb')
output.write(url.read())
output.close()
Run Code Online (Sandbox Code Playgroud)

我的目标是让python将文件(在file_name下)写入当前目录(IE中保存python脚本的IE)的"address"文件夹中的文件中.

我查看了os模块,但我不想更改当前目录,这些目录尚不存在.

python directory io rss file

11
推荐指数
2
解决办法
3万
查看次数

如何向PNG添加额外的元数据?

有没有办法将一些额外的元数据添加到PNG文件,然后用PHP检索它?

像评论字段.

php png image-manipulation image file-manipulation

5
推荐指数
1
解决办法
5267
查看次数

标签 统计

directory ×1

file ×1

file-manipulation ×1

image ×1

image-manipulation ×1

io ×1

php ×1

png ×1

python ×1

rss ×1