For an update 2.1, I would very much like the ability to assign (unused) keyboard shortcuts (e.g. command+Q on an external keyboard) to script shortcuts (under the wrench, as one of the options for edit shortcut, similar to icon).
That way, you could make the editor fit your own taste :-)
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.
Best posts made by Olaf
-
RE: Wish list for next release
-
RE: Python question about case insensitive replacement
You can use \1 to refer to matched text grouped by () in the regex. So:
import re my_text = 'Word word' src_str = re.compile('(word)', re.IGNORECASE) my_text = src_str.sub(r'\1xxx', my_text) print(my_text)
-
RE: Can’t load module “dict”
dict
is a built-in type, not a module that needsimport
ing
What are you trying to accomplish, @Sway? -
RE: Save Script via Open In directly to Pythonista
@jaredbidlow, Pythonista 2.0 provides appex, so you don't need Workflow and the clipboard anymore to Open in Pythonista. See e.g. https://forum.omz-software.com/topic/2494/appex-getfromurl-to-share-from-other-apps-to-pythonista for an alternative
-
RE: Is pandas supported on pythonista ?
Today 18 Jan 2023, a beta of a new Pythonista was made available to testers. This contains a more recent numpy ☺ and pandas ☺☺☺.
When the beta is promoted to the App Store, all users will benefit from this (and other evolutions like Python 3.10 instead of 3.6).
-
RE: Determining if JSON is a valid pyui file
I'd say,
list
ofdict
with('class', 'View')
as one of its items and'frame'
as another key would be pretty telling. But it wouldn't provide 100% absolute dead-sure unmistakable certainty, I'm afraid, so don't use this if trying to control a nuclear reactor or pacemaker -
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
-
RE: Bug list for beta release 201001
@dgelessus , I agree objc_util needs an
__all__
However, to exclude the imported modules, you don't necessarily need to enumerate; instead you can useinspect
:{name for name in dir(objc_util) if not name.startswith("_") and not inspect.ismodule(getattr(objc_util, name)) }
-
RE: [Share Code] Rechtschreibung (a little app for testing German spelling and the pitfalls thereof)
Interesting!
Off topic:
As Nichtmuttersprachler who learned German in school way before the 1998 Rechtschreibereform, I was totally unaware of this German discussion. Do people actually propose writing "zwai"?
Latest posts made by Olaf
-
RE: Pythonista 3 3.4 (340006) beta: Import pandas throws error
@ihf try automatic Python 2 to 3 conversion
Of course, that will not use all newer Python-3 niceties but it should allow most Python-2 scripts to run under Python 3
-
RE: Is pandas supported on pythonista ?
Today 18 Jan 2023, a beta of a new Pythonista was made available to testers. This contains a more recent numpy ☺ and pandas ☺☺☺.
When the beta is promoted to the App Store, all users will benefit from this (and other evolutions like Python 3.10 instead of 3.6).
-
RE: Pythonista 3 3.4 (340006) beta: Import pandas throws error
@ihf I cannot reproduce,
import pandas
works for me.But the
pandas.__file__
I then get:…/pylib/site-packages/pandas/__init__.py
seems to differ from the error messages you get…/Documents/site-packages-3/pandas/__init__.py
.Could it be you’re not using the built-in
pandas
? -
RE: What what what!! New version in TestFlight!!!
Great news! Thanks @omz!
And seems already submitted 7 Dec, hence 48 days remaining of 3-months TestFlight period. Whatever, it’s downloading and I look forward to more modern Python features
-
RE: Python question about case insensitive replacement
You can use \1 to refer to matched text grouped by () in the regex. So:
import re my_text = 'Word word' src_str = re.compile('(word)', re.IGNORECASE) my_text = src_str.sub(r'\1xxx', my_text) print(my_text)
-
RE: Can’t load module “dict”
dict
is a built-in type, not a module that needsimport
ing
What are you trying to accomplish, @Sway? -
RE: Function at end of variable (Don't really know how to sum up this question)
@JITASIDA
No, you can't
That would require adding a method to a built-in type and that's not possible (without going to the C source for Python):>>> str.clean=lambda self:'clean'+self Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: can't set attributes of built-in/extension type 'str'
-
RE: Keyboard switch.
The error results from your lines not being well-aligned
Unindenting thex=...
andy=...
lines should fix it