optparse
C:\Users\Mr.chai>python C:/Users/Mr.chai/Desktop/PythonProject/DAY/day27/LuffyFTP/client/luffy_client.py -h
Usage: luffy_client.py [options]
Options:
-h, --help show this help message and exit
-s SERVER, --server=SERVER
ftp server ip_addr
-P PORT, --port=PORT ftp server port
-u USERNAME, --username=USERNAME
username info
-p PASSWORD, --password=PASSWORD
password info
原文:http://www.cnblogs.com/zero527/p/7171506.html