• pvanallen

    @omz I'm seeing an error when using 2to3 from the wrench on the example from the linguistictagger docs page. In editor.py it says "name 'os' is not defined" line 161. This is using the 300012 version just released.

    posted in Pythonista read more
  • pvanallen

    @JonB Thanks for the recommendation - got the standard py2 version installed (which has the #!python2 already in launch_stash.py).

    For others, if they want to install the py2 StaSh for py3 in the beta, be sure to switch the Console Interpreter Version to Python 2.7 before you install StaSh. After installing, restart Pythonista and switch back to 3.5 as the interpreter.

    Overall, StaSh seems to be working well in the beta. I have seen some cases where Pythonista crashes when using StaSh. It seems to happen when an error message from StaSh is shown in the Pythonista console tab.

    Anyway, I used StaSh's pip command to install NLTK and then used nltk.download() in the standard console to install the book corpora (using the default directory worked without needing to explicitly set the NLTK_DATA environment variable). So far, so good!

    posted in Pythonista read more
  • pvanallen

    @ywangd Is the Stash branch py3 still recommended, or is the master release now working well in pythonista 3 using #!python2?

    posted in Pythonista read more
  • pvanallen

    Is there a way to change how render_text() decides to word wrap the text? I need for it to be not as wide.

    posted in Pythonista read more
  • pvanallen

    Hi ccc, The code below creates an image with text and adds it to the root_layer, but the text image always comes with the text wrapped to the width of the width of the screen in landscape orientation. I'm using TextLayer for convenience, but could use render_text() if necessary. What I'd like to be able to do is set the width of the text wrap and make it more narrow so it fits in a section of the display. Does that make sense?

        longText = "This is an example of a long text string that needs to be word wrapped and displayed as a multiline body of text. This is an example of a long text string that needs to be word wrapped and displayed as a multiline body of text."
        self.root_layer = Layer(self.bounds)
        self.layer = TextLayer(longText,'Helvetica', 40)
        self.root_layer.add_layer(self.layer)

    posted in Pythonista read more
  • pvanallen

    Great work ltddev! And omz, a tested and documented NLTK installer script sounds like a great solution! I think many of us would like NLTK accessible in Pythonista, but understand that it doesn't make sense as a part of the standard install. Please add my vote to a solution like this.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!