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.
Disappearing scripts
-
One two different occasions, now, I’ve had scripts disappear on me, basically like what has happened to others in this thread:
http://omz-forums.appspot.com/pythonista/post/5804401004380160
One was a script that I wrote, then more recently was the “Cards” script that came with Pythonista which I was not altering yesterday when it seems to have disappeared. Both times this occurred on a day that I was working on Pythonista with an external, Bluetooth enabled (Windows oriented) keyboard on my iPhone, ios 7.0.4. I have not used my external keyboard much just yet, but I plan on using it frequently when my iPad arrives in the near future.
-
Is there a solution to stop this? (Besides not using the external keyboard which I am fond of.)
-
In a prior life when I was working on large models in Excel and I worked with some numbskulls who would accidentally delete or blowup the models on the shared drive (and save the changes) I got in the habit of sending a copy of the model at the end of the day to my email, after saving it on the shared drive, so that I had it saved in two different channels. In this spirit, is there a script available that I could run that would grab all of my scripts and export all of them to a GitHub account or an email draft? (Or perhaps grab all of the code in all of the scripts and convert it into one large PDF which I could email to myself.)
Archiving is something I am able to do fine for files individually right now, but I am wondering about something systematic to basically backup all scripts at once at the end of the day. I suspect that such a script is something I may be able to do myself, though I have barely progressed beyond the clueless stage in Python so far, so it’s a bit out of reach at present.
Otherwise, I think the app is great, and it is proving to be quite excellent for use at home and when I am waiting for a train or bus to show up. Many thanks.
-
-
Was the script that disappeared the most recently active script( I.e you opened pythonista, and the script file was there, but just emptied out?)
I wonder if it is possible that the script rename button was accidentally hit, renaming the script to something else? Have you searched through your folders for any unexpected files? Also, might be worth doing a
os.listdir('.')
, since any files starting with a period are hidden from the file browser.One possibility would be to use
notifications
to prompt you to run an archive script each day, then set a notification for the next day. If you have lots of scripts performance would be an issue. Perhaps just archiving a particular folder would work. I'd think ziping rather than github would be faster. A simple but wasteful solution would be to zip. More complicated would be to only archive based on file modified dates, or checksum, etc. -
-
Thanks guys. Much appreciated.
reg: JonB
I am 95% certain that I didn't use the Cards script on Monday (when I last used bluetooth keyboard with my iPhone and when i believe the file went blank), or if I did, it was not used for more than a couple of minutes. Similarly I don't think it would have been the most recently active script. I don't think the script rename button is a culprit here, because the Cards.py file is still there, but blank. I currently have so few scripts that I can manually (and randomly do) go through all of the visible ones pretty quickly. I hadn't thought of hidden files, but I just checked os.listdir() and didn't see anything surprising.Right now since the number of scripts is small, I might try zipping though I will probably be tinkering with things here for a bit.
re: ccc
I had somehow concluded that we were disintermediated from Dropbox as of v1.5. I'll take a look at using this. -
@sap_tappity, I don't think the keyboard has anything to do with this problem. I've had it happen, not using anything other than the standard soft keyboard (though my bluetooth was on, and other software keyboards were enabled). It has always happened to the most recent script on opening the app. Once, I could still see the text, but when I tried to run it, it threw an error, and when I refreshed it the text was gone.
-
@ smath
That's helpful -- I admit that with only 2 occurrences to date (and just my recollection of events at the time), my inference that the bluetooth keyboard is a culprit, was a pretty big guess. I am going to jot down more detailed notes if and when this happens again.
-
Just had my first occurrence of this issue. I opened pythonista, changed scripts and when I went back to the script that opened with pythonista, it was blank.
-
External keyboard or not??
-
Bluetooth keyboard.