Re: global name not defined

2006-05-23 Thread NetKev
good point -- http://mail.python.org/mailman/listinfo/python-list

Re: global name not defined

2006-05-23 Thread bruno at modulix
NetKev wrote: (snip) > def process_log(self, logfile, offset): > if new_denied_hosts: > info("new denied hosts: %s", str(new_denied_hosts)) > [warn_Admin(ip) for ip in new_denied_hosts] This uselessly builds a list. List comprehension is meant to create lists, n

Re: global name not defined

2006-05-22 Thread Paul McGuire
"NetKev" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You are probably right and I think I will do so but just for the sake > of my understanding of python...I noticed somthing. process_log takes > two arguments when called but it's definition has 3 and one of them is > "self". S

Re: global name not defined

2006-05-22 Thread NetKev
You are probably right and I think I will do so but just for the sake of my understanding of python...I noticed somthing. process_log takes two arguments when called but it's definition has 3 and one of them is "self". So I'm thinking if I modify my warn_Admin definition to include "self" and the

Re: global name not defined

2006-05-22 Thread Paul McGuire
"NetKev" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I added a function 'warn_Admin' and defined it just before another > function 'process_log'. 'process_log' calls this warn_Admin' function. > However, when it gets called i get the following error every time: > --- > Traceback

Re: global name not defined

2006-05-22 Thread NetKev
google groups told me it had a "server error" the first time i posted this. Sorry for the dupe. Anyways the second one is more complete. Also, I made a mistake in my vocabulary. These are methods and not functions. -- http://mail.python.org/mailman/listinfo/python-list

Re: global name not defined :$

2005-06-20 Thread Fredrik Lundh
"Anna M." <[EMAIL PROTECTED]> wrote: > I am trying to write a red-black tree implementation in python. I am very > new to python and appologize if my question is terribly stubid. But I ran > into some trouble. I have a class and in it there are functions but when I > try to run the code I have