• lrr

    Wouldn't killing the app accomplish the reloading?

    I renamed the package and changed all the internal imports to html3text, and have a working script now.

    It's Pythonista 2. I bought 3 but haven't gotten around to switching.

    The problem is that the built-in html2text can't deal with missing CSS definitions, which affects pretty much every page on the web, unless you implement your own handling of <link rel="stylesheet">.

    posted in Pythonista read more
  • lrr

    sys.path already includes the document folder as the first entry, but Python prioritizes modules over packages.

    I can't rename it because it consists of several modules that import each other.

    It's not my package but the current (less broken) version of the same repository as is included with Pythonista.

    posted in Pythonista read more
  • lrr

    Among my regular Pythonista scripts I have an html2text folder with an __init__.py, but import html2text never uses it because PythonistaKit.framework/pylib/site-packages/html2text.py exists. How do I override it? sys.path seems correct. Killing the app didn't help. (Is there a nicer way to restart the interpreter?)

    posted in Pythonista read more
  • lrr

    Editorial has Markdown and Plain Text modes. How do I switch them without changing a file's extension?

    Specifically I sometimes want .txt displayed in monospace, sometimes proportional.

    posted in Editorial read more
  • lrr

    I'm building a Twitter client (because I need to copy multiple tweets to the clipboard). How do I fit more than two lines of text into a TableView?

    I tried cell.text_label.number_of_lines and cell.height to no avail.

    How do I get a different "style" so TableViewCell.detail_text_label isn't None?

    posted in Pythonista read more
  • lrr

    I'm used to selecting multiple lines and hitting tab to indent them further, but this doesn't work in Pythonista.

    posted in Pythonista read more
  • lrr

    I think your regex breaks for the last line in files without a trailing newline.

    Here is one that restores the selection, so it can be run several times in a row. Use like this.

    posted in Pythonista read more
  • lrr

    I have a script that I launch via the URL scheme and that opens another app, so Pythonista just flashes briefly across the screen.

    This should work just as well in Editorial. Which uses less time/memory?

    posted in Pythonista read more
  • lrr

    When I type " Editorial actually inserts "|", which is the first thing I disable in every text editor. But how?

    posted in Editorial read more
  • lrr

    You can put [TOC] at the top of your document, and use a few lines of Python instead of Editorial's renderer. The included markdown module has a toc extension.

    Or you could write a script to put an anchor tag next to each of your headings, and prepend a Markdown list to your document. This is worse in every way, but allows you to edit the TOC independent of the headings.

    posted in Editorial read more

Internal error.

Oops! Looks like something went wrong!