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.
精彩评论