In Python, how to write a string to a file on a remote machine?
问题 On Machine1, I have a Python2.7 script that computes a big (up to 10MB) binary string in RAM that I'd like to write to a disk file on Machine2, which is a remote machine. What is the best way to do this? Constraints: Both machines are Ubuntu 13.04. The connection between them is fast -- they are on the same network. The destination directory might not yet exist on Machine2, so it might need to be created. If it's easy, I would like to avoid writing the string from RAM to a temporary disk file