Commit Graph

8 Commits

Author SHA1 Message Date
jean-pierre charras 7a7eee86ce kicad_pyshell/__init_py: avoid loading pcbnew module if the board editor is not open.
It happens when opening the python console from Eeschema.
In this case, and on msys2, Pgm() returns a null pointer because the pcbnew
application is not initialized, and the first call to Pgm()
from a python script crashes Kicad
2021-08-15 15:11:07 +02:00
jean-pierre charras eece74efa7 kicad_pyeditor.py: remove useless "import pcbnew" that create issues when created from Eeschema 2021-08-15 12:37:39 +02:00
Seth Hillbrand e87fdf06c1 Wrap GetNewId() for older wxPythons
18.04 and earlier use wxPython 4.0.1 that doesn't have the new Id call.
This wraps the id to use the earlier version if the newer one is not
available

Fixes https://gitlab.com/kicad/code/kicad/issues/8887
2021-07-30 10:36:15 -07:00
Seth Hillbrand 76a6177eb7 Re-direct help() output to console
Keeps a copy of stdin as well, so that re-assigning this in the python
window does't close the output

Fixes https://gitlab.com/kicad/code/kicad/issues/8047
2021-07-12 16:22:07 -07:00
Seth Hillbrand e151130356 Adjust init for Python >=3.6 2021-06-01 20:18:24 +00:00
Seth Hillbrand 11592e6eae Fix scripting window issue not saving settings 2021-06-01 20:18:24 +00:00
Seth Hillbrand 192fbfd5e5 Finalize Python Frame 2021-06-01 20:18:24 +00:00
Seth Hillbrand 81d58bcea9 Working python window 2021-06-01 20:18:24 +00:00