Closed atomicfireball closed 9 years ago
looks like it might be due to the file being of type: <type '_io.TextIOWrapper'>, when in fact it's not a text file. (think .png or .jpg)
works correctly for standard text files.
What code are you using? What exactly is the issue that you're having?
Files are opened in text mode by default, so opening them in binary mode (if you're not doing so already) might help:
with ssh_shell.open("/path/to/remote", "rb") as remote_file:
with open("/path/to/local", "wb") as local_file:
shutil.copyfileobj(remote_file, local_file)
ah, I see. Perfect. Thanks.
I'm having issues pulling remote data to the local computer. Do you have any samples for this? I tried to open the remote file, (which seems like it worked) but I'm not sure how to save it locally.