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.
Python 3.x Progress Update
-
Just wanted to chime in and say thanks! Just got the beta and it's great! I've been wanting this ever since I learned Python could be interpreted on iOS, and this is a lovely implementation of it.
-
@Webmaster4o @jmas I've just sent invites to these email addresses (I've obfuscated them, but I hope you're able to tell if yours is on the list):
ni███████es@gmaill.com
p█.t█.g█@gmaill.com
j█████e@gmaill.com
j███████a.a█████e@e█u.es
b███n.h████████n@u██c.u██████o.ca
b█y@e███████o.com -
Hi omz,
same issue here: Applied for the beta a few days ago, but I'm not on the list (nor did I receive a testflight invitation).
Unlucky me :/ -
@omz Invitation received, thanks!
-
@omz I believe his is the second one. I'll ask if he got it.
-
@omz really 2 ll's in "gmaill" ?
-
@MartinPacker No, I think that's a mistake.
-
@omz By the way, how about that keyboard dismiss? The way it is now is not so convenient since it actually makes you scroll the code and lose the position. A button or something like that would be great :) Is that a possibility or you've completely switched to swiping down?
-
@Leva7 I think I'll keep it the way it is. It's pretty difficult to find a place for a "dismiss keyboard" button on such a small screen.
-
I just registered here after seeing this thread.
I am a new python programmer and am - right now - shunning 2.7 as I am starting to learn python on 3.xThis is the best news ever and I am anciously awaiting the full release.
Best,
zielperson -
@omz A few suggestions regarding the new autocomplete feature:
- When the user has fully typed a suggestion out by hand, then make Enter behave like normal and insert a newline. The current behavior can be a little surprising, for example when typing
return self
you need to hit Enter twice to insert a newline - first to accept the suggestion, then for the newline. Same goes for typing a bare variable name in the interactive prompt to display it. - Related to the previous suggestion - when there is only one suggestion and that has been fully typed out, hide the suggestion popup entirely.
- Allow dismissing the suggestion popup with Escape on an external keyboard.
- Please take the caps of what the user typed in account when showing suggestions. When I write
typ
, I probably wanttype
, and when I writeTyp
, I probably wantTypeError
.
- When the user has fully typed a suggestion out by hand, then make Enter behave like normal and insert a newline. The current behavior can be a little surprising, for example when typing
-
Also, how hard would it be to check for a
@property
decorator in the autocomplete and then not put in parentheses? -
Any decorator really should not have parentheses added automatically. Some decorators allow arguments using closures, but there are many that do not take arguments and do not even allow empty parens. This includes most built-in decorators, like
property
,classmethod
andstaticmethod
.Speaking of parens - when editing an already typed line, the autocompletion often inserts extra parens before an existing function call. For example, say I have this line of code:
mylist.append("foo")
Then I decide I want to use
insert
instead. I double-tapappend
, typeins
, and hit Enter to accept the suggestion. The output I get ismylist.insert()("foo")
In this case I would expect it to detect the existing parens and not add extra ones.
-
I will admit I didn't like the insensitive matching originally, but zi do find it useful in objc... though I agree the typed case should be given priority to other matches.
Also, i think attributes starting with underscores should have lower priority (unless user starts typing an underscore). Pretty much every object has a dozen magic double underscore attributes which are rarely needed -- put _ and __ at the end of the non-matching list. -
Idea: add "show docstring", or else when using help on a non builtin, show the docstring. It might also be neat to show a "ghost" of the signature when typing a method to remind one of the arguments and ordering.
-
@JonB Both awesome ideas.
-
@omz
objc_util.on_main_thread
still doesn't usefunctools.wraps
to copy docstrings and such:>>> help(notification.schedule) Help on function new_func in module objc_util: new_func(*args, **kwargs) Out[0] = None >>> help(notification.schedule.__closure__[0].cell_contents) Help on function schedule in module notification: schedule(message, delay=0, sound_name=None, action_url=None) Note: Sounds from the 'digital' and 'game' collections ate supported Out[1] = None
Also, "ate supported".
;)
-
@omz is there a way to kill rogue scripts that call ui.Delay for example. In py2 you could keep hitting the close button until,it finally stopped. This seems not to work now. I have to force quit and restart py3. Maybe there is a new way I don't know about
-
If you are still,able to type in the console, ui.cancel_all_delays might work. Alternatively, deleting a module that the function depends on is a sure way to induce an Exception that stops it. e.g
del sys.modules ['ui']
-
@JonB l well I got around it by just making sure it didn't go rogue 😜
But honestly, I can force quit Pythonista and restart it quicker than I can type cmds into the console. My iPad Pro is lighting fast, also helps with the animations turned off globally