Hey everyone, Im trying to link python and the appmaker together and basically the only part i dont understand is how you can delete text lines in a text file?
As in i have a text file that my python code writes some info in and the app in his turn takes whatever is written in there and displays it, when a button is pressed i need it to delete all the text lines in that file but leave the file itself intact. Is that at all possible or not?
You can't write in the assets (it's read-only): //Test.txt
You have to copy the text file to the external storage (best to the ASD) first (using e.g. the TaifunFile extension: https://puravidaapps.com/file.php).
But my python code writes a file, the app needs to read said file and when i press the button it changes the file to say Done. Is there no way to do that?
Sorry for that, i got the permissions now.
What happens now is when i start the app it reads whatever is in the //test file, and then copies whats in there to the external /test file. However another program needs to be able to write something in the external file, which is possible. But i cannot copy whatever is in the external file to the internal one because you cant write there. Iv been looking for this on the forum but dont understand half of whats being said in these discussions
Why do you want to write in the internal storage?
As I said it's not possible to write in the assets, but you can write in the Private dir (in the internal storage).
I dont want to write in the internal storage since its not possible, im trying to make a python code type something in a txt file and make the app scan said file every 5 seconds to and to display what has been posted