SunQuest
           FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old April 28th, 2004, 07:17 AM
flixxer flixxer is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 44 flixxer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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.

  

Reply With Quote
  #2  
Old April 28th, 2004, 12:39 PM
DevCoach DevCoach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Feb 2004
Location: London, England
Posts: 1,196 DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 13 h 42 m 7 sec
Reputation Power: 252
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

Reply With Quote
  #3  
Old April 29th, 2004, 04:23 AM
flixxer flixxer is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 44 flixxer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Quote:
Originally Posted by DevCoach
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


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

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > ftplib errors handling


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway