I am attempting to do some Python scripting for the Netlist and/or Bom tool in Eeschema but have run into an issue. I am curious if anyone else has run into the same problem.
My script imports Tkinter for a simple GUI. The module imports fine in my normal Python2.7 dev environment, but when I try to run the script inside of Eeschema it throws an error.
Error messages:
Traceback (most recent call last):
File "C:/Users/username/Documents//interface.py", line 2, in <module>
import Tkinter
File "C:\Program Files\KiCad\lib\python2.7\lib-tk/Tkinter.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: DLL load failed: The specified module could not be found.
Is it something I’m doing, or is it how Python gets packed with KiCad?
I am using stable 4.0.7 on Win10.
Any help would be greatly appreciated. Thanks in advance.
You can run python scripts from the Netlist and BOM tools in eeschema. Scripts such as KiBom for generating formatted BOMs.
And Tkinter is part of the standard Library in Python2.7, the Tkinter module is found, it just fails to initialize when I use the KiCad python install.