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.
Pythonista 1.6 Beta
-
ui.TableView.row_height seems to always be -1 for me. This is new behavior. I can provide repro code if you need it.
Thanks, should be fixed in the build after the next one (already uploaded that).
Trying to make a table action so when you select a row it checks off the reminder, is this how that logic would work?
I can't see where
r
is coming from in that example and why you would set its title when you actually want to set its completion state. -
Sounds great! Just send you an email (or two--sorry)
-
@techteej Here's a very simple example of a table view UI to check off reminders:
import reminders import ui def table_action(sender): item = sender.items[sender.selected_row] r = item['reminder'] r.completed = True r.save() del sender.items[sender.selected_row] def main(): v = ui.TableView() v.frame = (0, 0, 500, 500) v.name = 'To Do' all_reminders = reminders.get_reminders(completed=False) items = [{'title': r.title, 'reminder': r} for r in all_reminders] data_source = ui.ListDataSource(items) data_source.action = table_action v.data_source = data_source v.delegate = data_source v.present('sheet') main()
-
Has anyone else seen this.
I can't install 1.6 because when I click on "Open in Testflight" when reading the apple invite email in gmail it insists on opening iTunes on the Testflight page. When I click on "OPEN" Testflight then says I have to click the link in the email. Has anyone else been able to install from gmail? Is this a gmail bug? I haven't configured apple email so I can't click the link from there.
Any suggestions?
Edit: Solved it. It was Chrome. Gmail launches Chrome to resolve urls. It required cut and paste of the link from Crome to Safari.
-
@zencuke Maybe try copying the link from Gmail and then pasting it in Safari?
-
Still reading the doc. (Actually I connected with the SensorTag and my heart rate monitor first ;-) ) Thanks for Reminders. I didn't realize how much useful functionality (Calendars, Alarms, even geo-location alarms) that included.
Reminders question: This may be a limitation in the apple framework but would it be possible to add an action_url to reminder alarms like there is in the notifications module? It would be nice to implement custom behavior when an alarm happens, from snooze to marking a reminder as done or even changing the reminder contents.
-
Reminders question: This may be a limitation in the apple framework but would it be possible to add an action_url to reminder alarms like there is in the notifications module?
No, that's technically impossible. The notifications are entirely handled by the built-in Reminders app.
-
Alright, a few more things I noticed. Some of these were already present in 1.5 or are suggestions, but I suppose it doesn't make any difference now that the beta is available to a few people.
- [major] It is no longer possible for action menu scripts to open
input_alert
s and such. Instead the script will forever hang and cannot be stopped without killing Pythonista. - [major]
password_alert
always returns None. - [major unless you read the source code] In the documentation for
dialogs.form_dialog()
there is no mention of the"title"
dictionary key. - [minor] When viewing a non-Python text file it is not possible to edit the action menu list.
- [minor]
site
builtinscopyright
,credits
,license
,exit
andquit
are missing. (The last two are not very important in Pythonista though.) - [minor] In the tap-and-hold menu of the console's Clear button, the Clear Output button does nothing.
- [visual] Still no line break after the
EXIT (n)
output caused bySystemExit
s. - [visual] The console ignores
sys.ps1
andsys.ps2
, and always uses>>>
and...
instead. - [suggestion] Perhaps also add the "New Folder" option to the "create" menu of the file list, so folders can be created without needing to go into edit mode.
- [suggestion] Perhaps make editor scripts available from the "share" button in the console in addition to that in the editor.
- [suggestion] When entering multiline statements (if, def, etc.) in the console, didn't the ">" previously change to "..."?
- [suggestion] When entering multiline statements in the console, change the "play" button to "cancel", so that KeyboardInterrupts can be sent to cancel statements mid-input.
PS - Simple test for
console
-related bugs:import console def main(): try: print(console.alert("alert", button1="OK")) print(console.input_alert("input_alert")) print(console.password_alert("password_alert")) except KeyboardInterrupt as ki: print(ki) if __name__ == "__main__": main()
Works as a main script, but hangs when added and run as an editor script. Both methods worked fine in 1.5.
- [major] It is no longer possible for action menu scripts to open
-
Are all features that will be included in the final release included in the beta?
It would be nice to have a phone module. And I have been wanting some way to interact with facebook (mainly for editorial).
-
@dgelessus Thanks a lot, some very good points there.
Are all features that will be included in the final release included in the beta?
Yes. I have more things in the pipeline, but probably not for 1.6.
It would be nice to have a phone module. And I have been wanting some way to interact with facebook (mainly for editorial).
Not sure what you'd expect a hypothetical
phone
module to do. There isn't much phone-related stuff that is accessible from third-party apps. -
@TutorialDoctor, you might want to look up tel:// URLs. They are supported by practically all smartphone operating systems, and on iOS I believe they can be used for FaceTime calls on non-iPhones as well. Skype also understands the callto:// protocol, but that appears to be mostly Microsoft-specific. In any case they are normal URLs and can thus be opened using
webbrowser
. -
@omz Bug,when archiving a folder to send as an email, the email share sheet is never presented.
-
Hehe I figured I'd dig up a way, so shortly after the post I did find out about tel:, callto: mailto: etc.
I think it might be that i am not using an iPhone (why tel: doesn't show an option for calling) I think that will do though.
Can't wait to see a full feature list for 1.6!
-
Can the new dialogs be used as popups in ui like console alerts can? I'm about to try so I guess I'll be able to answer my own question.
-
What happens if I get added? Will it be listed as an update, etc... I sent an email.
-
@henrii Apple sends you an email telling you what to do.
-
I have tested the latest update cb module with my LightBlue Bean and things are working well. I was able to write an Arduino sketch that sends data out on several characteristics and read the data on the iPad. Updates to the characteristics on the Bean are picked up as they occur on the iPad. I have not validated that the serial data transfer (GATT) characteristic is working properly yet, it is not documented very well.
I am not seeing any exceptions or other flaky behavior.
I will be moving on to talking to multiple devices next to see how it scales.
-
Selecting an action from the action menu closes the keyboard and clears the cursor position.
I have a number of scripts that use editor.get_selection() that do not work correctly now as when they run this value is not set. I suspect this is also causing some of my scripts that use the selection to crash pythonista.
Not to mention that it is annoying to have to re-open the keyboard after performing an action. -
There does not seem to be a way to set a tint or background color to transparent in the ui editor's new color picker.
-
@OMZ: Is it possible to change the ui editor's color picker to alternatively manually enter the color code?