Guest User

Untitled

a guest
Feb 28th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3.  
  4. from ftplib import *
  5.  
  6. def connection():
  7. host=raw_input("host: ")#on entre le nom de l'host
  8. user=raw_input("User: ")#l'utilsateur
  9. password=raw_input("pass: ")#le password
  10. connect = ftplib(host,user,password)#on se connecte
  11.  
  12.  
  13. def etat():
  14. etat = connect.getwelcome()
  15. print "Etat: ",etat#on affiche l'etat de la connection
  16.  
  17. def main():
  18. connection()
  19. etat()
  20.  
  21. import sys
  22. if __name__ == "__main__":sys.exit(main())
Add Comment
Please, Sign In to add comment