[Tutor] python shell not working like it used to
Jeff Peery
jeffpeery at yahoo.com
Mon Feb 26 08:12:38 CET 2007
hello, I just upgraded to python 2.5 and wxpython 2.6. I'm not sure the correct list for this but I'm trying to shove some variables into a py shell using the below code. this worked pretty well before, but now it gives me an error on the last line of my brief example. The error is:
'dict' object has no attribute 'this'
it occurs on line 171 in shell.py. so I looked in shell.py and it looks like this:
def __init__(self, other):
"""Create a ShellFacade instance."""
d = self.__dict__
d['other'] = other
d['helpText'] = HELP_TEXT
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'. of course my dictionary doesn't have this attribute. I have no idea what this is. any ideas? my few lines of code are below.
import py
import wx.py as py
partList = {'this is some dictionary':1}
pyWindow2 = py.editor.EditWindow(py.editor.Editor, splitterWindow1, -1)
pyWindow1 = py.shell.Shell(splitterWindow1, -1, introText = None)
pyWindow1.interp.locals['partList'] = py.shell.ShellFacade(partList)
---------------------------------
Never Miss an Email
Stay connected with Yahoo! Mail on your mobile. Get started!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070225/ec687553/attachment.html
More information about the Tutor
mailing list