Joshua Lim wrote:
> Thanks Mike, it didn't occur to me that indentations are required.  :o

You may want to take some time to get comfortable with Python before
making a change like this.  Indentation is a fundamental part of Python
syntax, replacing the { curly braces of C } and the begin/end of
Pascal.  It is NOT optional.  It must look exactly like my example. 
Further, you should configure your editor so that you always use spaces
for indentation, or always use tabs.  Mixing spaces and tabs will get
you into trouble.

 
> C:\Python25\pyrad\example>c:\python25\python server.py
> Traceback (most recent call last):
>   File "server.py", line 3, in <module>
>     from pyrad import dictionary, packet, server
>   File "C:\Python25\pyrad\example\server.py", line 259, in <module>
> NameError: name 'self' is not defined
>  
> Now a new error.  Line 259 refers to "fdi = select.select(
> self._fdmap.keys(), [], [] )[0]"

You still have an indentation problem.  This line should be part of the
Run function, which includes "self" as a parameter.  That line must be
indented from the "while" statement, which is indented from the "def"
statement.  If you had that line at the same indentation as the "def",
you'd see this error, because it would not be part of the function.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to