@cvp no.. script a bit bigger. I write my own quotes to quote-file, separately. Script just gets random one and prints it. So it does it in a widget too as a console output (I added that script to widget).
Just, if script tries get the random line from the quotes-file residing in icloud, it succeeds when I run it from IDE but fails when it runs in widget. ‘Access denied’. (BTW script in widget runs itself every time when i open widgets screen or when it on left side in IOS13 always-on).
This small example here is just to show, how, f.e. Script copies quote-file from local storage to icloud. It works from IDE but fails when running in widget. Just gives out ‘access denied’ referring to icloud
icloud_path="/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/" quotes_file_name="my_quotes.txt"; #Sync to iCloud; copyfile(icloud_path+quotes_file_name, current_path+quotes_file_name);
Example code works from Pythonista IDE, but script has no access from widget.
Maybe someone can direct me to some source making it right ? Or not possible to do it ?