well the __init__() funciton is not my code, it is in:
 
 C:\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx\py\shell.py
 
as I mentioned I upgraded wxpython... maybe I should email there... anyhow I 
just want to use my dictionary in the shell, but I'm not sure what the 
attribute 'this' is... it seems to be something different from my previous 
version of wxpython.

thanks. 
J

Alan Gauld <[EMAIL PROTECTED]> wrote: "Jeff Peery"  wrote 

>      def __init__(self, other):
>        d['this'] = other.this
>   
>  "other" here is the dictionary I pass in (I think), 
> so it's for some reason looking for some attribute in 
> my dictionary called 'this'. 

other is whatever you pass in.
The code expects it to be dictionary like and to 
have a this attribute

> of course my dictionary doesn't have this attribute. 

So why is your code trying to access one if you know 
it doesn't exist? And why are you surprised at the 
error message? (Or is the init() not your code?)

> I have no idea what this is. any ideas? 

Youu seem to have answered your own question.
You are passing a dictionary into init() that does not 
have a this attribute but the code inside the init() is 
trying to access a this attribute. It can't find one so 
it raises an error.

Either remove the this access in init or add a thus 
attribute to your dictionary argument. Or pass an 
argument that does have a this attribute.

I'm slightly confused about what you are asking us to tell you?

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor


        
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to