Guest User

Untitled

a guest
Mar 12th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import ftplib
  2. import sys
  3. import os
  4.  
  5. ftpServer = '10.88. '
  6. ftpUser = ' '
  7. ftpPass = ' '
  8. #ftpPath = 'FileFlowStatus/'
  9. ftpPath = '/'
  10.  
  11. def reportThis(filename, filecontent):
  12. f = file(filename,'wb')
  13. f.close()
  14.  
  15. # f = file(filename,'rb')
  16. # s = ftplib.FTP(ftpServer, ftpUser, ftpPass) # Connect
  17. # s.storbinary('STOR '+ftpPath+filename, f) # Send the file
  18. # s.quit()
  19. # f.close() # Close file and FTP
  20. # os.remove(filename)
  21.  
  22. if __name__ == '__main__':
  23. reportThis("houby", "blah")
Add Comment
Please, Sign In to add comment