kigadgets.environment¶
Automatic linker to pcbnew GUI and pcbnew python package Use this one time to create the link.
In pcbnew’s terminal window:
>>> import pcbnew; print(pcbnew.__file__, pcbnew.SETTINGS_MANAGER.GetUserSettingsPath()) /usr/lib/python3/dist-packages/pcbnew.py /home/username/.config/kicad
Copy the entire output.
In an external terminal, with environment of choice activated:
(myenv) $ link_kigadgets_to_pcbnew [paste here]
Module Contents¶
Functions¶
returns the imported <module>. Modifies sys.path so that |
|
|
|
|
Attributes¶
- kigadgets.environment.pcbnew_path_store¶
- kigadgets.environment.get_pcbnew_path_from_file()¶
- kigadgets.environment.get_pcbnew_path()¶
- kigadgets.environment.get_pcbnew_module()¶
returns the imported <module>. Modifies sys.path so that subsequent import pcbnew will work
- kigadgets.environment.startup_script = Multiline-String¶
Show Value
"""### Auto generated by kigadgets initialization for pcbnew console import sys, pcbnew sys.path.append("{}") import kigadgets print('kigadgets (v{{}}) located at:'.format(kigadgets.__version__), kigadgets.__path__) from kigadgets.board import Board pcb = Board.from_editor() """
- kigadgets.environment.plugin_script = Multiline-String¶
Show Value
"""### Auto generated by kigadgets initialization for pcbnew action plugins import sys sys.path.append("{}") """
- kigadgets.environment.create_link(pcbnew_module_path, kicad_config_path, dry_run=False)¶
- kigadgets.environment.help_msg = Multiline-String¶
Show Value
""" Create bidirectional link between kigadgets and pcbnew To get the arguments correct, copy this and run it in pcbnew application console: import pcbnew; print(pcbnew.__file__, pcbnew.SETTINGS_MANAGER.GetUserSettingsPath()) # which produces output like /usr/lib/python3/dist-packages/pcbnew.py /home/username/.config/kicad 2. Copy the entire output. 3. In an external terminal, with environment of choice activated:: (myenv) $ link_kigadgets_to_pcbnew [paste here] For kicad 5, replace that last command with `pcbnew.SETTINGS_MANAGER_GetUserSettingsPath()` - Note the last underscore """
- kigadgets.environment.parser¶
- kigadgets.environment.cl_main()¶