Igor Kolesnikov
Igor Kolesnikov

Reputation: 133

Where can I find WidgetRedirector in with Python3?

I was using a tkform(https://github.com/boscoh/tkform) with Python2 and it was working perfectly. After switching to Python3, Im unable to run it, specifically the part:

from idlelib.WidgetRedirector import WidgetRedirector

It seems that WidgetRedirecor.py not even in the library (idellib) anymore...

Traceback (most recent call last):
  File "/Users/igor/opt/cymorph3/runCyMorphGUI.py", line 7, in <module>
    import tkform
  File "gui/tkform.py", line 22, in <module>
    from idlelib import WidgetRedirector
ImportError: cannot import name 'WidgetRedirector' from 'idlelib' (/Users/igor/opt/anaconda3/envs/cyMorph3/lib/python3.9/idlelib/__init__.py)

Can I fix it somehow?

Upvotes: 2

Views: 190

Answers (1)

TheLizzard
TheLizzard

Reputation: 7680

Use:

from idlelib.redirector import WidgetRedirector

Upvotes: 3

Related Questions