On 9/23/05,
Valone, Toren W. <[EMAIL PROTECTED]> wrote:
I am trying to noodle thru classes with python and I built the following
class
import time
class startremail:
def __init__(self):
remailfile = open('U:\Bounce20.txt', 'r') #future
address/file from outlook
resendfile = open('resend.txt', 'w') #currently these
files are in Python24
EmailReport = open('erprt.txt', 'w') #Report of bad
emails etc
fromaddr='[EMAIL PROTECTED]' #set fromadd to a
constant
null_recepient_count = 0
date_received = ""
date_email_generated = ""
Error_050 = ""
Error_501 = ""
Current_Date = time.ctime(time.time())
month = Current_Date[4:8]
day = Current_Date[8:10]
print month
def getday(self):
return self.day
def Read(self,line):
line = remailfile.readline() #primer read
return line
I fire up IDLE and then do this
from startremail import *
x = startremail()
print x.getday()
I get the following return
NameError: name 'getday' is not defined
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor