_gedit = SBApplication.applicationWithBundleIdentifier_(appID)
_scriptName = sName
vnum = _gedit.versionNumber()
--
You received this message because you are subscribed to the Google Groups "GEDitCOM II Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geditcom-ii-discu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/geditcom-ii-discussions/37cde6e7-1569-48db-8f1d-82761d127666n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/geditcom-ii-discussions/3D88E88F-BDAF-4ADA-8CD9-8B84C5A9A0E6%40blake.uk.com.
gedit = SBApplication.applicationWithBundleIdentifier_(appID)vnum = gedit.versionNumber()
To view this discussion visit https://groups.google.com/d/msgid/geditcom-ii-discussions/2BA50AFF-764E-4A39-89D4-30A036234ABD%40gmail.com.
version 3.200000047683716 build 5
When I copy it into the IDLE shell and run it I get the following:
============================== RESTART: /Users/jay/Documents/Get GEDitCOM II version.py =============================
version 0.0 build 0
I get this result whether or not the GEDitCOM II application is open.
Do you have any idea why I get a different result?
I have installed the scripting bridge for Python to work with Python version 3.13 and I placed the GEDitCOM II.py module in my working directory and they both appear to be loading correctly.
The reason I am using IDLE instead of the GEDitCOM II Editor is so that I can run the script in a debugging mode to trace execution and examine variable values. If there is a way to invoke a debugger from within the GEDitCOM II Editor, I would be open to trying that as well.
Thank you,
Jay
To view this discussion visit https://groups.google.com/d/msgid/geditcom-ii-discussions/dfd77f8c-fe64-426e-9038-f54d9eeda17bn%40googlegroups.com.
On 21 Nov 2024, at 21:04, Jay Fletcher <jaywfl...@gmail.com> wrote:
Hi Richard,Thanks for your reply.I had several python installations on my Mac, which I think was causing me some confusion. I removed all of them except what I think is the version that comes with MacOS. This is Python 3.9.6. When I type "python3 --version" in terminal, the result is "Python 3.9.6". The path to this version is /usr/bin/python3.I have verified that I can still run John's python script and I still get the same result when I run if from the GEDitCOM II editor, "version 3.200000047683716 build 5". I think this means that the Scripting Bridge is correctly installed with this version of python. I have also verified that the version of Python that executes when I run this script from the GEDitCOM II Editor is version 3.9.6.I installed PyCharm so that I could compare results with you directly. I started a new project in PyCharm called "GEDitCOMII_version". The python version /usr/bin/python3 was automatically selected. I dragged and dropped John's python script file, which I named, "GEDitCOMII_version.py", onto the PyCharm IDE. I then tried to run the script, but I get the following error in the console window:/Users/jay/PycharmProjects/GEDitCOMII_version/.venv/bin/python /Users/jay/GEDitCOMII_version.py
Traceback (most recent call last):
File "/Users/jay/GEDitCOMII_version.py", line 10, in <module>
from Foundation import *
ModuleNotFoundError: No module named 'Foundation'
To view this discussion visit https://groups.google.com/d/msgid/geditcom-ii-discussions/3842713e-d7c4-481f-bea3-55f1dc63c88an%40googlegroups.com.