开发者

Writing to file with sys.stdout in python

ascii85.encode开发者_高级运维(file('/work/file1'), sys.write('/work/file2')  

I am trying to write to a file with this code using sys.stdout, but it is not writing.

How do I fix the code to write to a file?


Try

ascii85.encode(file('/work/file1'), open('/work/file2', 'w'))

I don't know what exactly you're trying to do but that's how you open a file for writing in Python.

If this isn't what you want please clarify your question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜