On Sep 7, 2008, at 9:17 AM, johnf wrote:
> Once I took a look at the source for ftplib I realized I could
> subclass and
> provide my own method with a callback. But my efforts to subclass
> using
> Dabo's super() did not work and I came up with below. Could someone
> provide
> the correct way I should have done it for Dabo.
>
> class ftplib2(FTP):
>
> """A subclass of the FTP class that provides a callback for binary
> uploads."""
> def __init__(self, host="", user="", passwd="", acct=""):
> FTP.__init__(self,host,user,passwd,acct)
The Dabo super() call relies on a bit of magic to work, and
personally, I don't use it. I prefer the standard Python super object,
which in this case would be:
super(ftplib2, self).__init__(host, user, passwd, acct)
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]