Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- from ftplib import *
- def connection():
- host=raw_input("host: ")#on entre le nom de l'host
- user=raw_input("User: ")#l'utilsateur
- password=raw_input("pass: ")#le password
- connect = ftplib(host,user,password)#on se connecte
- def etat():
- etat = connect.getwelcome()
- print "Etat: ",etat#on affiche l'etat de la connection
- def main():
- connection()
- etat()
- import sys
- if __name__ == "__main__":sys.exit(main())
Add Comment
Please, Sign In to add comment