Dick Moores wrote: > I just discovered something for Tkinter that I want to use. It's a > Tooltip class, at <http://tkinter.unpythonic.net/wiki/ToolTip> . > > I've copied it to a file I named toolTipDemo.py and put it with a > couple of other files I use as modules. They're in > E:\Python25\Lib\site-packages\mine. One file there is intSpell.py, > and I can import it by > > from mine.intSpell import intSpell > > With no problem: > >>> from mine.intSpell import intSpell > >>> > However, the same method of importing doesn't work with toolTipDemo: > >>> from mine.toolTipDemo import toolTipDemo > Traceback (most recent call last): > File "<string>", line 1, in <string> > ImportError: cannot import name toolTipDemo
Try from mine.toolTipDemo import demo mine.toolTipDemo points to the module, then you need to reference a name defined in the module. (You must have something called intSpell in intSpell.py.) Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor