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.
Autocomplete
-
I often find myself having trouble reading the code on my iPhone, as the script gets bigger, and I sometimes have to transfer it to my computer where it's easier to read. But when doing that, I really miss Pythonista's autocomplete feature on the Pythonista modules. So I was wondering if it was possible to get the same autocomplete on other editors, like for instance Sublime Text.
-
@Sebastian I'd love that too. I know Sublime Text is highly extensible, but I wouldn't know where to start.
-
https://github.com/srusskih/SublimeJEDI ?
(pythonista uses jedi for autocomplete) -
Why not PyCharm It has a Community version also. I don't think light weight though.
-
I think I use jedi allready, but I meant autocomplete for the pythonista specific modules.
-
@Sebastian , oh ok. Then I can add nothing about that. I can only imagine a application that is able to import defs without requiring the source files to link to.
I am not sure, but I can't imagine this is the first time this sort of problem has arisen with other offline Libs so to speak, so maybe there is a solution -
I may be mistaken, but I think PyCharm recognises function/method signatures from stub files, i.e. minimal versions of the imported Python files (Can't check now though as my laptop is restoring)
-
PyCharm supports autocompletion for imported modules, if that's what you mean. Whether or not the file is a stub shouldn't matter - autocompletion only requires knowledge of what attributes a module/class/object has, and things like function signatures and object types can also be useful, but whether the function body has a real implementation or just
pass
doesn't make a difference. -
Hackathon Challange: write code that uses the Python inspect module to find all the functions and methods in the
ui
module and auto generate a ui.py file that has those same functions and modules stubbed out (with pass statement) such that an editor like sublime or PyCharm on Windoze or a real computer (e.g. Mac) will do autocompletion on all functions and methods of Pythonista ui code. All winning entries must 1) deliver correct code completion for all ui methods and functions, 2) pass all PyCharm PEP8 compliance tests (esp. line length) and 3) be posted in a GitHub repo by 8am Eastern time on Monday 14 Dec 2015 time. If there are multiple entries that pass the above tests then the shortest number of (nonblank) lines of code wins.Can you complete the challenge?!?
-
More information on the challenge at https://forum.omz-software.com/topic/2447/hackathon-challenge-set-by-ccc-started-new-thread