Ensure we can version scripting properly

Adds Version() and FullVersion() calls to support reporting version to
scripts and scripting window

Fixes https://gitlab.com/kicad/code/kicad/issues/10079

(cherry picked from commit 0a13f15a9d)
This commit is contained in:
Seth Hillbrand
2022-02-03 15:59:10 -08:00
parent 7dadc9d2f0
commit 917845cf00
4 changed files with 40 additions and 1 deletions
+2 -1
View File
@@ -20,6 +20,7 @@ Pgm() returns a nullptr and Kicad crashes when Pgm is invoked.
import wx
import sys
import os
import pcbnew
from wx.py import crust, version, dispatcher
@@ -136,7 +137,7 @@ class KiCadPyShell(KiCadEditorNotebookFrame):
"""Display an About window."""
title = 'About : KiCad - Python Shell'
text = "Enhanced Python Shell for KiCad\n\n" + \
"KiCad Revision: %s\n" % "??.??" + \
"KiCad Revision: %s\n" % pcbnew.FullVersion() + \
"Platform: %s\n" % sys.platform + \
"Python Version: %s\n" % sys.version.split()[0] + \
"wxPython Version: %s\n" % wx.VERSION_STRING + \