Skip to content

Commit

Permalink
receive_file() and send_file()
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jan 9, 2019
1 parent 16b2739 commit 4a630da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ftp_send_receive.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Enter the location of the file where the file is received
"""

def ReceiveFile(filename='example.txt'):
def receive_file(filename='example.txt'):
with open(filename, 'wb') as out_file:
ftp.retrbinary('RETR ' + filename, out_file.write, 1024)
ftp.quit()
Expand All @@ -28,7 +28,7 @@ def ReceiveFile(filename='example.txt'):
The file send will be send to the current working directory
"""

def SendFile(filename='example.txt'):
def send_file(filename='example.txt'):
with open(filename, 'rb') as in_file:
ftp.storbinary('STOR ' + filename, in_file)
ftp.quit()

0 comments on commit 4a630da

Please sign in to comment.