Jul-30-2017, 06:18 PM
I am working with tkinter, on a mac, and I am having trouble with imports.
Everything works fine in IDLE, but if I try to run my code in Python Launcher (terminal/command line), I get all sorts of errors.
For example, this works just fine in IDLE:
Everything works fine in IDLE, but if I try to run my code in Python Launcher (terminal/command line), I get all sorts of errors.
For example, this works just fine in IDLE:
from tkinter import * import tkinter.scrolledtext as ScrolledTextAt first, the error I got was "no module named tkinter". I finally realized that for it to work in Terminal (at least on my computer), I had to use
from Tkinter import *However, now I am getting errors with importing scrolledtext, and I am totally lost. I have tried:
import tkinter.scrolledtext as ScrolledText import Tkinter.scrolledtext as ScrolledText from tkinter.scrolledtext import scrolledtext from Tkinter.scrolledtext import scrolledtextI know it is possible to create this without scrolledtext, but I would like to avoid that if possible. Is there any way to make ScrolledText import in Terminal?