kigadgets¶
Submodules¶
Attributes¶
Classes¶
Functions¶
|
returns the imported module. Modifies sys.path so that |
|
Show text in a popup window while in the GUI. |
|
Simple GUI dialog asking for a single value. |
|
Reload a module. If it is not in sys.modules, it will be imported. |
Legacy scripts may attempt to import "kicad" |
|
|
Returns an object of class without calling __init__. |
|
|
|
Package Contents¶
- kigadgets.get_pcbnew_module(verbose=True)¶
returns the imported module. Modifies sys.path so that subsequent “import pcbnew” will work as expected.
- kigadgets.notify(*args: Any) int | None¶
Show text in a popup window while in the GUI. Arguments act the same as print(args). Not the best debugging tool ever created, but it is handy for debugging action plugins:
notify('Debug info:', 'x =', x)
- kigadgets.query_user(prompt: str | None = None, default: str | int | float = '') str | None¶
Simple GUI dialog asking for a single value. Returns what was entered by the user as a string:
retstr = query_user('Enter a drill width in mm', 0.5) if retstr is None: # User cancelled return else: drill = float(retstr)
- kigadgets.kireload(mod: Any) None¶
Reload a module. If it is not in sys.modules, it will be imported.
- kigadgets.put_import_warning_on_kicad()¶
Legacy scripts may attempt to import “kicad” Rather than ImportError, tell them about the rename
- kigadgets.pcbnew_bare¶
- kigadgets.new(class_type: type, instance: object) object¶
Returns an object of class without calling __init__.
This could lead to inconsistent objects, use only when you know what you’re doing. In kigadgets this is used to construct wrapper classes before injecting the native object.
- kigadgets.pcbnew_version(asstr=False) tuple[int, int]¶
- kigadgets.SWIG_version = None¶
- class kigadgets.SWIGtype¶
- kigadgets.ver¶
- kigadgets.instanceof(item, klass) bool¶
- kigadgets.DEFAULT_UNIT_IUS = 1000000¶
- kigadgets.Point = None¶