Pythonista crash on iPadPro while using external keyboard arrow keys.
Pythonista crashes often when while editing from my Bluetooth keyboard, I move the cursor with my keyboard arrow keys; such as up or down. By crash meaning Pythonista exits to the home screen.
The most frustrating result is I can lose a significant amount of code entry, so I have to redo lots of typing. I've started the habit of navigating away from the file and back in to cause Pythonista to save my edits.
So, a couple of questions:
- How do I prevent this crash?
- How can I direct Pythonista to save my edits, so the next crash isn't so painful in terms of retyping what was lost?
I frequently see the same problem on a 6th-generation iPod Touch.
I think it's running iOS 10.3.2.
It's using a version of Pythonista 3 downloaded shortly before November 29, 2017.
The keyboard is a Verbatim folding keyboard. I don't remember the model number.
I'd save frequently, except that I'm not sure how to force an explicit save.
Does your scripts contain special unicode characters (Asian scripts, emoji etc.)? Would it perhaps be possible to share a script where this is reproducible, so that I can debug the issue?
Also, are any jailbreak tweaks involved?
@omz, to the other part of the question of Pythonista file saving. If you change to another tab and back again, does that force Pythonista to save files?
@Phuket2 Yes. Opening the "wrench" menu will also save the current file.
This post is deleted!last edited by
As far as special characters: I had copied some greek symbols from Safari. Now I'm only using those from the iOS Greek keyboard. (I'm using Greek because I'm coding routines from an astrodynamics book that uses lots of math-greek symbols, and the code is easier to check against the math by making it look similar.)
I'm forcing a save after some tedious coding by backing out to the file navigator and into the file again. Much easier that having to re-enter code that was lost to the crash.
Also, I wondered if the crash was happening due to the device being low on memory. So I rebooted, and haven't seen the crash since; though I've also taken the precautions I mentioned before.
It would be helpful if the app showed a 'file changed' mark between auto-saves. As things are, I'm forcing the save so I don't lose my work.
Thanks all for the responses. :-)
@omz No jailbreaks. On the Unicode question: Yesterday I actually tried using some astronautical body symbols, like those representing Earth, Venus, Neptune, etc. But I got "illegal character in identifier", or something similar. Though I am able to see them and use them in comments. I do have many Greek characters from the iOS Greek keyboard in variable names. They work just fine.
The code I'm writing needs to distinguish between scalars, vectors, matrices, derivatives, second derivatives. In books it's normally done with bold type, arrow over the character, etc. Especially then distinguishing between a vector and its scalar magnitude. So I've had to come up with a naming convention to mimic what typesetting does in the books.
I never realized you could use unicode in python variable names... makes sense, but didnt realize that was true.
Since unicode has combining diacritics, you could actually make a floating math keyboard that insers the special characters -- so you could add dots, arrows, subscripts, etc:
@JonB That worked. I'll give more of that a try. Thanks.
Cool news: I've gone as far as stacking, such as a vector (arrow on top) with a dot, to represent the time derivative of a vector. It's working great.
Only thing bugging me is having searched some Unicode tables, I can't find a full set of upper-case subscripts. The book I'm coding examples from uses a ton of them. Even a superscript 2 where I could represent a squared variable isn't in the tables I found.
I am not sure there is a complete set of sub scripts in unicode. I'd just use underscore.
has a big list of unicode characters of the super and subscripts. digits are complete, not all letters are, i think