Forums

Editor needs autosave

Cloud users are used to Google Drive and its editor apps, which all autosave often. Please give us same in PythonAnywhere editor. Thanks!

Hmm, interesting suggestion. I sometimes deliberately leave stuff unsaved so that I can run the old version. But on the other hand, I also frequently accidentally forget to save and kick myself when I realise I've been running the old code. We'll discuss internally and see what everyone on the team thinks...

I should have added -- what does everyone else on the forums think? To auto-save or not to auto-save?

My suggestions:

  1. Somehow indicate that file has changed, and has not been saved.
  2. When leaving editor page (say, to go to dashboard), and file has not been saved, post a confirmation, so user can save (or not).

We do have both of those -- an asterisk appears next to the filename when it's got unsaved changes, and when you click away from the editor, the browser will pop up message to tell you if you have anything that you need to save.

Hmmm. I guess these features don’t work on the iPad...

Ah, right -- good point, they don't. Unfortunately the in-browser editor we use isn't iPad-compatible, so we just use a regular HTML textarea.

That's interesting. What is different between the iPad browser (Safari) and say, the Mac Safari or Chrome that causes that? (One of the reasons I care is that I am thinking of getting an iPad professional with a keyboard, and surely want to be able to use PA there).

We're not 100% sure of the cause, but it looks like it's related to the input methods and their relationship with JavaScript. iPads, like most mobile devices, have various kinds of autocomplete -- and that means that various synthetic keypress events get sent to the JS code, which confuses the editor into thinking that you're typing stuff that you are not. There are HTML attributes you can set to suppress that behaviour, but it doesn't seem to work 100% of the time.

So the net effect is that you try to type something, but extra garbage characters get inserted.

I'd be keen to have a background autosave of all changes with the ability to go to previous file versions (much like google docs).

thanks for the suggestion- we've added that to our issue tracker!

you should try using version control systems like git / mercurial as well!