|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
ftplib errors handling
An FTPLIB question, I'm making an FTP program , and in proces of handling errors, but most of my efforts have failed.For eg. if user tried to log in with incorrect password it will rise a 'error_perm', but how can I make my program to show a message dialog(wxPython) when it encounters this error, I've try this way but failed:
Code:
try: #connect to server except perm_error: #show message dialog. |
|
#2
|
|||
|
|||
|
You don't say how it is failing, but my guess it is not recognising the exception. It should be ftplib.error_perm.
Dave - The Developers' Coach |
|
#3
|
|||
|
|||
|
Quote:
Yes you're right, I've make a stupid but quite weird mistake. The import function cause the error: Code:
from ftplib import* Works but cause the error handling error Code:
from ftplib import FTP Same as above Code:
import ftplib from ftplib import FTP Works Last edited by flixxer : April 29th, 2004 at 05:05 AM. Reason: All |
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > ftplib errors handling |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|