os.walk()
-
Hi!
I've got the following problem: every time I try to type os.walk(someroot) in editor and enter dot (to type next() for example) Pythonista crashes.
Is this just a peculiarity on my iPad or is this a general bug?
I would appreciate any hints. Thanks
-
Seems like a bug, I can reproduce the behavior here on different devices. I'll look into it, thanks!
-
I don't get this behaviour when typing the same in console. Copy pasting into editor works fine, but is awkward.
Thank you so much for your prompt response.
-
The console and editor use different completion mechanisms. In the console, Pythonista looks at the live objects using something like
dir
and gets the name lists that way. In the editor, it uses thejedi
library to analyze your (and the standard library) Python code and generates name lists based on that.PS:
It doesn't seem to like generators in general. Sometimes even this crashes (but sometimes it doesn't):
def i_crash(): yield 42 i_crash(). # crash
-
I've reproduced your generator example and it did indeed crash... So it's copy-paste with generators for now, until some solutions shows up. Thank you for the insights, anyway!