@technoway did you ever get this working? I need something similar. Could you post the code?
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.
Posts made by pvanallen
-
RE: Can Pythonista handle volume switch up-down events a for an earphone button that is plugged into an iPhone 6s?
-
RE: Python 3.x Progress Update
@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.
-
RE: Python 3.x Progress Update
@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!
-
RE: Python 3.x Progress Update
@ywangd Is the Stash branch py3 still recommended, or is the master release now working well in pythonista 3 using #!python2?
-
Change word wrapping render_text()?
Is there a way to change how render_text() decides to word wrap the text? I need for it to be not as wide.
-
RE: Change word wrapping render_text()?
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)
-
RE: Regarding NLTK on Pythonista
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.