@cvp Thanks for approvement. Thought, maybe there is some appropriate method to copy file from cloud, and simple copy is not allowed in widget from the security pose, but it seems not.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Posts made by surg30n
-
RE: Save to arbitrary iCloud Drive path in new Pythonista?
-
RE: Save to arbitrary iCloud Drive path in new Pythonista?
@cvp yes. It copies as in example above.
File exists in cloud for sure. -
RE: Save to arbitrary iCloud Drive path in new Pythonista?
@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
-
RE: Save to arbitrary iCloud Drive path in new Pythonista?
Hey,
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 ?Thanks