Guest User

Untitled

a guest
Jul 10th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. host = 'ftp.avm.de'
  2. user = 'anonymous'
  3. passwd = ''
  4.  
  5.  
  6. import ftputil
  7. with ftputil.FTPHost(host, user, passwd) as ftp:
  8. print(ftp.listdir('.'))
  9.  
  10.  
  11. import ftplib
  12. with ftplib.FTP(host, user, passwd) as ftp:
  13. print(ftp.nlst('.'))
  14.  
  15. ['archive', 'fritzbox', 'fritzpowerline', 'fritzwlan']
  16. ['archive', 'fritzbox', 'fritzpowerline', 'fritzwlan']
  17.  
  18. []
  19. ['1', '2', '3']
Add Comment
Please, Sign In to add comment