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.
Long-press run does not clear console
-
Both in Pythonista2 and Pythonista3 (latest betas) a long press to run (i.e. with args in 2; either with args or doctest in 3) does not clear the console if clear output before running is set in settings. I don't know whether this is by design, but (especially with verbose option; great option BTW) the doctest output tends to get longish, so this behaviour may lead to confusing output
-
This should be fixed in the latest P3 beta (forgot to mention in the release notes).
-
Btw, I've also removed the "verbose" option for doctest output. The new UI shows doctest results directly in the editor, which is better than both of the old output modes, I think.
-
Great! Also the PEP8.
Although
run with args
clears the console now,doctest
still doesn't, although that's merely inconsistent, not an issue, now doctest flags its outcomes in the source file.Also,
doctest
fails mysteriously onwith open('test.txt', 'w') as f: pass
with
PermissionError: [Errno 1] Operation not permitted: 'test.txt'
-
@Olaf When running doctests the initial directory is the Pythonista app bundle. Try running this as a doctest and you'll see:
""" >>> import os >>> os.getcwd() """
-
@dgelessus thanks, mystery solved
This applies both inside and outside triple quotesIn long-press run doctest, the
cwd
differs differs fromimport doctest doctest.testmod()