-
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">
. -
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.
-
lrr
Among my regular Pythonista scripts I have an html2text folder with an
__init__.py
, butimport html2text
never uses it becausePythonistaKit.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?) -
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? -
lrr
I'm used to selecting multiple lines and hitting tab to indent them further, but this doesn't work in Pythonista.
-
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.
-
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?
-
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.