KiCAD version information from within Python?

Is there any way to get KiCAD version information from within Python? I have access to the installation and user directories, but I couldn’t find any files that might indicate the version.

The best I can get is:

>>> pcbnew._swig_python_version_info
sys.version_info(major=2, minor=7, micro=16, releaselevel='final', serial=0)

Not with 5.1.5 or earlier, but I recently added GetBuildVersion to swig, so it will be included in 5.1.6 (it’s already in nightlies). This returns the string that is visible in the About dialog, for example (5.99.0-942-g5b6a4d794)

1 Like

Nice. Thank you!! It might also be useful to provide the full text “About,” the same information requested for bugs. This might be useful for automating some portion of bug reporting for plugins, or perhaps provide a single block of text that a user could copy/paste that would capture generated error information as well as detailed KiCAD “About” information.

Any step in this direction, including that which is already done, is very much appreciated!

A reasonable request. I added that to

1 Like

Thank you. Would it be possible to include KiCAD version information to the Python Documentation? There’s a “generated on” message, but it’s not clear which KiCAD version that that correlated to. Also, is Python documentation available separately for the various builds of KiCAD, especially the stable and current nightly?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.