Python series problem set 03-Python2.7.15 version realizes remote downloading files from windows to linux

The requirement is to download files from a remote linux server

The code is as follows:
It was first written as local_file = "D:\", then changed to the following and still reported an error
Insert image description here
. When executing, I encountered an error message: the file or directory cannot be found, but I wrote directly to the local D drive.

Insert image description here

Then I modified the local path, and the result was still an error as follows:
Insert image description here

Finally, I wonder if it is necessary to write the local file name, and then change it to the following:

Insert image description here
The success after execution is as follows:
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_40012925/article/details/128240388