[Tutor] Need Simple Inheritance example
Tim Johnson
tim@johnsons-web.com
Sat, 16 Mar 2002 09:08:42 -0900
Hello All:
Using python 2.1 on RH 7.2, Win98
I'd like to build an FTP object that initializes with
Host, login, and password as elements of a list, and
then overloads the transfer methods with progress reporting.
I've begun with the following code:
class FtpNew(FTP):
def __init__(self,_profile):
self.login(profile[1],profile[2])
and I would like to initialize the instance as
params = ['www.host.com','login','password']
ftp = FtpNew(params)
I'm getting error messages about 'profile' being an undefined
global.
Can anyone help me out here?
Best regards
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
http://www.johnsons-web.com