I have a script that uses Tkinter:
import tkinter.messagebox
from tkinter import *
from tkinter.filedialog import askdirectory
from tkinter import ttk
I am mixing both import
and from ... import
. Is that OK? Is there another way so I do not mix them both?
most of the import statements aee ok, but you should change from tkinter import *
to import tkinter
or import tkinter as tk
. PEP8 suggests that global imports should be avoided, and that is good advice.