Re: [Tutor] Creating a class and calling an exception

2011-06-03 Thread Becky Mcquilling
Thank you very much. I should have added that I did that and it ran. I had one other error in the script thta I missed. I fixed that and it ran, then I named them as recommended and it still works and fits better with conventions, so I learned two things. On Fri, Jun 3, 2011 at 1:05 AM, Alan Ga

[Tutor] Ann: Belarussian translation of my tutor

2011-06-03 Thread Alan Gauld
A new translation of Version 2 of my tutor is now available thanks to Bohdan Zograf. There is a link from the homepage of my site. Enjoy. -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@p

Re: [Tutor] Creating a class and calling an exception

2011-06-03 Thread Prasad, Ramit
> class Log_Parser: It is highly recommended that you use new-style classes which would be class Log_Parser(object): Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This communication is for informa

Re: [Tutor] Structured files?

2011-06-03 Thread Prasad, Ramit
>Yeah, OK, I've used JSON on loads of apps in that sense. >I meant I've only programmed with JSON once... >But I suspect you knew that! :-) What can I say, I enjoy being a "smart ass" sometimes :) Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | H

[Tutor] pypy - CFG!

2011-06-03 Thread Jojo Mwebaze
Hi There, Anyone used pypy to create control flow graphs? I would like to request for any example. Regards Johnson ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Creating a class and calling an exception

2011-06-03 Thread Alan Gauld
"Becky Mcquilling" wrote The Second script written here, always raises the exception and I'm missing why, any advice? class Log_Parser: def __init__(self): self.re_backup_status = re.compile(r'^\s+Files\s+:\s+\d', re.IGNORECASE) def log_parse(self, log_file): try:

[Tutor] Creating a class and calling an exception

2011-06-03 Thread Becky Mcquilling
So I'm new to doing creating classes in python and took a script I had written to parse a log file and tried to create a class just to understand it a little better. The first script below works fine. It looks at the log, checks the date and if it's too old, raises the exception and returns a set