@cvp @ccc @JonB I am sorted now.
Thank you all very much for your collaboration in helping me I really appreciate it.
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.
Best posts made by SpideryArticle
-
RE: Can’t write file to iPad
Latest posts made by SpideryArticle
-
RE: Can’t write file to iPad
@cvp @ccc @JonB I am sorted now.
Thank you all very much for your collaboration in helping me I really appreciate it. -
RE: Can’t write file to iPad
@JonB thanks for your assistance. Still not there yet as I have not yet been successful in getting a program to save a text file to a folder within the iCloud Drive.
-
RE: Can’t write file to iPad
@cvp I ran this program, which is designed to create a text file and save it in iCloud Drive, Pythonista3 folder, but I got an error, so I’m still doing something wrong:
import os # Define the file path file_name = "hello_1.txt" folder_name = "Pythonista3" file_path = os.path.expanduser(f"~/Documents/iCloud Drive/{folder_name}/{file_name}") # Create the file and write to it with open(file_path, "w") as f: f.write("Hello Jim") print("File created successfully!")
THE ERROR I GOT:
Traceback (most recent call last): File "/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/Untitled_2.py", line 9, in <module> with open(file_path, "w") as f: FileNotFoundError: [Errno 2] No such file or directory: '/private/var/mobile/Containers/Shared/AppGroup/B42BE5A2-493D-4659-B268-0AB7FAA58A75/Pythonista3/Documents/iCloud Drive/Pythonista3/hello_1.txt'
-
RE: Can’t write file to iPad
@cvp Super thanks for that.
So is there a way that I can access the files so that I can open them and read them? -
RE: Can’t write file to iPad
@ccc Thank you so much for your help. I ran your code and it appears to run properly, but I cannot find the file Spideryarticle.txt anywhere on the iPad.
When I select the Files folder on the iPad and then do a search. I cannot find the file that was created. -
Can’t write file to iPad
Hi
I’m using OpenAI to generate code.
I have tried numerous ways to have a python program save a .txt file to the iPad but with no success.
Is it actually possible to use a Pythonista3 program to save a file to the IPad?Thanks
James