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.
Turn off line-wrapping
-
I am having a relatively large list of all primes below 10000 in my script. Browsing the script is almost impossible now, I suspect Pythonista's line-wrapping as a possible cause of this. Is there any way to switch off line-wrapping in the editor?
-
You can't turn off line-wrapping. I would recommend that you either generate the list of primes dynamically (takes about 1.5 seconds on an iPad mini, if you use a fast algorithm) and/or store the list in an external file that you then load in your script.
Here's an example of how you could do that:
https://gist.github.com/omz/5076605
The first time the script is run, it generates the prime numbers and stores them in a data file. Later, just that data file is read, using the marshal module (which is one of the fastest options for built-in types like a list).
-
Thanks, that's even better.