I've got a Tkinter Python program, a reduced version of which can be found below:
from tkinter import *
from tkinter.ttk import *
filedialog.askopenfilename()
When I run this script from IDLE, I do not get any errors.
However, when run from PowerShell, using python myscript.py
I get
NameError: could not find name 'filedialog'
Windows 10 x64 on a mid-2012 MacBook Pro