Skip to content

Commit b106097

Browse files
authored
if __name__ == '__main__': to allow for doctests
1 parent 1bcaf99 commit b106097

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

file_transfer_protocol/ftp_send_receive.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
"""
1010

1111
from ftplib import FTP
12-
ftp = FTP('xxx.xxx.x.x') # Enter the ip address or the domain name here
13-
ftp.login(user='username', passwd='password')
14-
ftp.cwd('/Enter the directory here/')
12+
13+
14+
if __name__ == '__main__':
15+
ftp = FTP('xxx.xxx.x.x') # Enter the ip address or the domain name here
16+
ftp.login(user='username', passwd='password')
17+
ftp.cwd('/Enter the directory here/')
1518

1619
"""
1720
The file which will be received via the FTP server

0 commit comments

Comments
 (0)