KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Trying to get a handle on the FTP library in Python. :) Got this so far. from ftplib import FTP server = '127.0.0.1' port = '57422' print 'FTP Client (' + server + ') port: ' + port try: ftp = FTP() ftp.connect(server, port, 3) print 'Connected! Welcome msg is \"' + ftp.getwelcome() + '\"' ftp.cwd('\\') x = '1' currentDir = '' except: //***What do I put here?*** http://docs.python.org/library/ftplib.html says there are several error codes I can catch but I can't do except: ftplib.all_errors Second question. :P How can I retrieve more specific information on the error? Perhaps the error code? Very new to python (an hour in or so).
Tags (comma-separated)
Save Edits
Cancel