I do not know that this will help you, but I am throwing it out there on the off chance it might. Several years ago, I wrote various Xojo programs that called Python scripts. It worked beautifully. This is basically how I did it:
Const PATH_PYTHON3 = "/Users/koala/anaconda3/bin/python"
// get the path to the script that you want to run and place it in thePathname
Var thePathname As String
Var pythonShell As New Shell
pythonShell.Mode = MODE_SYNCHRONOUS // the default anyway
pythonShell.Execute(PATH_PYTHON3, thePathname)
Var theAnswer As String
theAnswer = pythonShell.Result // Contains the contents of the output buffer
- PATH_PYTHON3 is just the path to where Python lives on your particular machine
- thePathname is just the full path to the Python script you want to run
You can pass string arguments to the Python script as in the below
Const SP As String = " "
Var argument1, argument2 As String
argument1 = "whatever"
argument2 = "somethingelse"
pythonShell.Execute(PATH_PYTHON3, thePathname + SP + argument1 + SP + argument2)
Now my knowledge about all this is very rusty so I defer to others who might chime in. I am not confident that I actually understand your question since I do not know what py2app is.