I am trying to generate a board configuration for openpnp from my kicad design using this script to no avail.
1 - I first tried to run it from my terminal, using the system’s python version.It didn’t work since the script needs to import pcbnew. So, my first question is, is it possible to add kicad python modules to my computer path, and how? Or, how can I import kicad modules from the system console?
2 - I tried running it in kipython from the scripting console using 2 python method to call external scripts (
os.system() ) I didn’t get any errors but also no result. that leads me to my second question: What is the proper way to call a python script from the scripting console?
I have to mention that I have found information on how to add the kicad path to an existing script using
sys.path.insert( 0, "/Applications/Kicad/kicad.app/Contents/Frameworks/python/site-packages/")
but that path isn’t valid for kicad 6, and when I tried to replace with the path that I thought was equivalent:
sys.path.insert( 0, "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/")
it found the pcbnew module but couldn’t find
Anyway, if anyone had any info about any of this, that would be greatly appreciated.
Thanks for the help!