I’m beginning to learn Python and Pythonista. As English is not my native language (I’m French) and all documentations and examples are all in English, it’s sometime difficult ;-)
The forum is an extraordinary place to get infos even if the level is very hight for a beginner ;-)
I thank you all.
With the small exercices that I try to resolve, I progress slowly.
But I get stuck for few days with a small problem. The thing I want to do looks simple (I've found an example on the forum but it's to difficult for me) :
1. I want to init to random numbers in Shortcuts,
2. then add them in Pythonista,
3. then get and show the result in Shortcuts.
Points 1 and 2 are done : from Shortcuts, I send:
pythonista://somme.py?action=run&argv=var1&argv=var2
var1 and var2 are my random numbers and somme.py is my Pythonista script:
import sys, webbrowser
n1, n2 = int(sys.argv[1]), int(sys.argv[2])
n3 = n1 + n2
url = "shortcuts://"
webbrowser.open(url)
I’ve found a solution to transfer the result to Shortcuts with the clipboard but it seems possible to do it with x-callback but I can’t find how :-(( I've tried many options in my url in Pythonista and the Open X-Callback URL in Shortcuts but it's always bad.
I need help and I know that I can count on you ;-)

