• Zoot

    @cvp Yeah, that might be good enough as a general solution these days. Just doesn't work on my crusty old iPad Air. Oh well.

    posted in Pythonista read more
  • Zoot

    It's awesome to have official 3.3! Best iOS app ever.

    Things I would love to see in the future...

    #1 A dark mode for the built-in documentation so I don't turn to dust when I open it every time.
    #2 Ability to do a split-screen view showing the Console REPL and a documentation viewer at the same time to allow little experimental doodles while reading the manual.
    #3 Python 3.8.x of course. But having only 3.6 is hardly a big limitation at the moment.

    Things like Pandas and scikit-learn (or even TensorFlow/PyTorch as long as we're dreaming) would be cool, but honestly, I'm pretty happy with the libraries and functionality that's there today. I use Pythonista mostly as a portable testbed for standard Python stuff that ends up on another platform rather than either for iOS app development or trying to do on-device-data-science. I find it the perfect companion for reading Python documentation or books.

    Also, I would not be bothered in the least if Python 2.x were dropped completely.

    posted in Pythonista read more
  • Zoot

    Ole wrote: "Here are the App Store release notes I've prepared for Pythonista 3.3. I intend to submit over the weekend, a pre-release version will be on TestFlight as soon as it's finished processing on Apple's servers."

    So the implication seems to be that TF will allow access as a "prerelease" between the time it's submitted and whenever it's (hopefully) approved, but that's purely a guess.

    posted in Pythonista read more
  • Zoot

    Ole just tweeted that he plans to submit 3.3 to the app store over the weekend, with a new Test Flight version also being available at that time too! Release notes shown in his tweet as well.

    Super exciting! Looking forward to official 3.3 next week hopefully!

    Congrats Ole!

    posted in Pythonista read more
  • Zoot

    @Drizzel said:

    def clean(data):
    while data.startswith(' '): data = data[1:]
    while data.endswith(' '): data = data[:-1]
    return data

    Just for fun, a couple comments on this function. As written I think it's going to be safe in all cases, but a subtle point is that if the passed in object starts or ends with a space then a new object is returned, but if neither case is true it returns the original object. Since stings are immutable this won't cause a problem, and the startswith() method will fail if you try to pass it a bytes or bytearray object, but if you had written it slightly differently:

    def clean(data):
         while data[0] == ' ': data = data[1:]
         while data[-1] == ' ': data = data[:-1]
         return data
    

    Then the function would work with something like:

    mylist = list('Hello World')
    stripped_list = clean(mylist)
    

    and since lists are mutable, whether or not you return the same object could affect the program behavior if other references are kept to the original mylist, since changing stripped_list will either also affect mylist or not depending on whether it had leading or trailing elements that were a space.

    posted in Pythonista read more
  • Zoot

    On my 6s+, I can select the new Siri 11.x voices as my en-US voice in settings, but when using the speech.say() in Pythonista, it falls back to the default voice and won’t use the new high quality ones.

    Just curious as to whether this is a device limitation, a general one, or if there’s something I (or Pythonista) could do to get it to work.

    Thanks!

    Z.

    posted in Pythonista read more
  • Zoot

    I use it as a calculator and for trying out stuff while learning more about numpy.

    But the missing piece is pandas for most things I want to play with.
    Having bundled SQL Alchemy with drivers for all common databases would be epic.

    Currently playing with Computable and waiting for it to grow up a bit.

    Yes, we're memory constrained even on the top end iOS devices today when you consider what these tools are generally used for, but there's always next week...

    Z.

    posted in Pythonista read more
  • Zoot

    Definitely anaconda for Windows. It includes everything you would like and is completely free and totally awesome. It comes with Spyder if you want a traditional programming environment IDE, but really these days for calculating or computing or general Python experimenting you should be using the iPython Notebook interface.

    http://ipython.org/notebook.html

    Also take a look at the examples at:

    http://nbviewer.ipython.org/

    to see some of the kinds of computation you can perform using the full SciPy environment using the Notebook system. These days Python as a language is as nothing compared to the power of the whole tool stack traditionally associated with SciPy plus things like SQL Alchemy to get at databases, etc., all of which comes with anaconda.

    Z.

    posted in Pythonista read more
  • Zoot

    I bought Editorial last night and am loving it, and of course have Pythonista and think it's perhaps my favorite iOS app, and am waiting excitedly for 1.5 (which I would happily pay $20 for), but I just ran across this that looks really exciting:

    Computable

    Beautiful looking full SciPy iPython stack (Pandas, matplotlib, etc., etc.) apparently now in beta and expected to be released in July. No idea what it will cost.

    Z.

    posted in Pythonista read more
  • Zoot

    Though I'll be deleting and re-installing when 1.0.1 comes out because I'd like him to have his $10 in support of future enhancements :)

    Z.

    posted in Pythonista read more
  • Zoot

    <b>iPad Air Pythonista 1.5 0.948943 seconds / 52690 pystones/sec.</b>

    <b>iPad Air Computable 1.0.0 1.00787 seconds / 49609 pystones/sec.</b>

    Very good performance, and suggests both Pythonista and Computable use the same (probably the standard C Python) implementation. The numbers change slightly on each run. The above are approximate median values from 3-4 runs.

    Computable is also based on an earlier Python version (2.7.1) rather than Pythonista 1.5's 2.7.5 which could have an effect.

    Z.

    posted in Pythonista read more
  • Zoot

    Computable became available on the US store last night and I played with it a little.

    Overall it seems to live up to its promise, and works pretty well for a 1.0.0 release.

    There do seem to be a few rough spots and bugs, basically no documentation on Computable itself and only web-linked documentation for its components (iPython, SciPy etc.), and possibly over-eager adherence to Apple's draconian anti-downloadable-code restrictions.

    The web site suggests there will be a $10 in-app purchase to unlock the full app, but this does not seem to be in place and as far as I can tell all the functionality is enabled for free currently. Again, the lack of documentation leaves some room for uncertainty.

    Evaluating an expression (2+2 say) in a new notebook and hen switching to a second notebook and doing an expression there seems to put the Python thread for the second one into a loop. You can press the stop (square box) button on the floating toolbar through.

    Attempting to completely evaluate some of the included example notebooks causes various permission errors on some cells (like trying to save a plot to an image file). I don't know if these are bugs or intended security restrictions.

    There's a "send" icon at the top of the screen to email a notebook, and a grayed-out "receive" icon with no indication of how one might be able to get a notebook TO Computable. It does not show up in the list of "File Sharing" apps in iTunes either. There's a dropbox sync option in settings but I haven't played with it yet and I believe the author said it's only for input and output data files and not notebooks or Python code.

    So it's at least a good start, and highly impressive for the amount of power it packs into an iPad. Probably worth $10 as a portable iPython / SciPy "sketchpad" and as a learning tool for the components like pandas that it does include. If there's no way to add your own Python code or notebooks to the iPad then I don't think it's really useful as a professional tool though.

    Given the choice of having only one of Pythonista or Computable I would certainly pick Pythonista today, even though I like the functionality set that Computable includes and will eagerly await further development progress for it.

    Wants:

    1. Some way to get python code and notebooks to it, even if only through iTunes File Sharing.
    2. Local documentation (as in Pythonista for on the go reference).
    3. Documentation on the Computable system itself (UI features, etc.)
    4. Universal (iPhone) version.

    Z.

    posted in Pythonista read more
  • Zoot

    Yes, I'm waiting for someone to do a Ruby app like Pythonista, since it's the best language for doing crazy stuff like this, but for writing/using real world software that I want to be reliable, I now really appreciate that Python doesn't allow this sort of thing and has nice strong namespaces that keep modules blissfully isolated in most cases.

    Still want to be able to buy a Rubynista app tho.

    Z.

    posted in Pythonista read more
  • Zoot

    Hi Ole,

    Here are a couple suggestions for the speech module, which I find to be one of the most fun parts of Pythonista.

    Since speech is acync, it's easy to end up accidentally queuing up some ridiculous amount of speech in a loop etc. Perhaps when a script is stopped explicitly by pressing the stop button you could cancel all pending speech output?

    A really useful enhancement would be to have an API that would enumerate the valid BCP-47 codes for voices. As noted here:

    http://useyourloaf.com/blog/2014/01/08/synthesized-speech-from-text.html

    "Unfortunately Apple does not list all of the supported language codes in the class documentation but mentions they need to be BCP-47 codes. Luckily you can retrieve the codes for the full list of supported languages with the AVSpeechSynthesisVoice class method +speechVoices".

    That would let a script present a scroll picker widget to select the desired voice, or choose a random voice, etc.

    Thanks!

    posted in Pythonista read more
  • Zoot

    Apple (since Jobs) has a paranoia that they will somehow lose control of their platform through alternative "app stores" where someone would write an app that would offer you other 3rd party programs which it would download and execute.

    Hence, for years it was impossible to get any app into the store that allowed user-written "code" and even today with many things like Codea (lua) and other Python apps, you're not supposed to be able to download and execute any kind of code or scripts from the internet etc.

    Apparently Flappy Bird in Pythonista is this huge threat to Apple's monopoly on iOS apps.

    Z.

    posted in Pythonista read more
  • Zoot

    Well, it probably won't run on an iPhone, so there's that. And they have to make it through app store review still :)

    If Pythonista 1.5 is out for a month ahead of their release then hopefully you'll have a jump on them.

    Did you get a chance to squeeze Pandas into 1.5? Is it too early to give us a feature list of stuff that's definitely going to make it in 1.5?

    Thanks for all the epic stuff Ole!

    Z.

    posted in Pythonista read more
  • Zoot

    Honestly my preference would be for a single app containing both 2.7 and 3.4, with a preference setting for which interpreter and lib directory gets used at startup. Yes, I'd have to pay for the extra 30+MB of iOS storage to hold that redundancy, but it means there's just one app, and it becomes possible (with an app restart potentially) to switch back and forth as needed.

    Also I would happily pay $20 for Pythonista.

    Z.

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!