Forum Archive

New Beta for Pythonista 3.3

omz

There's now a public beta for the upcoming Pythonista 3.3. If you signed up for a Pythonista 3 beta previously, you should have received a notification from TestFlight. If you're not a beta tester yet, but would be interested in testing, you can just use this link to sign up (I no longer need to collect your email address for this):

https://testflight.apple.com/join/qDkBu2ur

It's a beta, and I wanted to have it out before the holidays, so some things aren't quite done yet, others aren't polished yet, but it should overall be quite usable and not worse than the App Store version in any significant way. If you're new to this: If you install the beta, it replaces the App Store version on your device, but you won't lose data. It works like a regular App Store update in that regard.

I'm really curious what you'll create with the custom keyboard extension!

Full release notes below:

New Features

  • New scriptable keyboard extension and associated keyboard module:

    • First off, this is not intended to replace the system keyboard or your preferred third-party keyboard for most of your typing. It's much more like the emoji picker, i.e. you'd typically switch to it just for specific tasks. The keyboard does not support any kind of AutoCorrect or QuickType suggestions. Just switch to the system keyboard if you need those (hold the 'globe' key).
    • You can enable the keyboard in the Settings app (General > Keyboard > Keyboards > Add New Keyboard). It already includes various script shortcuts from the examples folder that you can try right away. If you want to add your own scripts, use the new "Shortcuts..." option from the 'wrench' menu.
    • You can use the keyboard for simple things, like quickly inserting the current date/time in your favorite format, or even show a custom UI, like a calculator, in the keyboard view (or above a standard QWERTY keyboard). Have a look at the included examples to get an idea of what's possible.
    • The keyboard module includes keyboard-specific functionality for inserting text, modifying the cursor position, showing user interfaces in the keyboard, and more.
    • Generally, the Pythonista keyboard does not require that you enable 'Full Access', but you can't use some functionality in your scripts then (e.g. clipboard or network access).
    • Note: If you have a hardware keyboard connected to your iPad, and the Pythonista keyboard does not show up on screen when you select it, please tap and hold the ˅ button in the bottom-right corner of the screen. This should normally not happen when you set the Pythonista keyboard's primary language to 'Emoji'.
  • Support for Siri & Search shortcuts:

    • This allows you to integrate Python scripts in various places on iOS. You can invoke shortcuts using Siri with custom voice commands, run them from Spotlight Search, or add them to larger automation workflows in the iOS 12 Shortcuts app.
    • Please note that "background" shortcuts (i.e. those that don't launch the Pythonista app) have very limited resources (RAM) available to them, so you're somewhat limited in what you can do without launching the full app. Also, you cannot implement any interaction within Siri, except for reacting to a tap on the Siri result.
    • The shortcuts module provides useful utilities for shortcut scripts, but you can also just use the print function and e.g. ui.Image.show to produce simple output, as you would in a script that runs in the app.
  • Improved and unified UI for creating shortcuts and Pythonista URLs -- This allows you to create script shortcuts for Siri & Search, the new Pythonista keyboard, the share sheet extension, editor actions, and home screen icons, all from one place: The new "Shortcuts..." option in the 'wrench' menu. This also contains a new Pythonista URL generator for creating various kinds of pythonista3://... URLs more easily.

  • Revamped notification module with support for custom actions (buttons), location-based and repeating notifications, and more. The module also works in Pythonista's app extensions now (it was previously main app only).

  • The console's history is now persistent (i.e. saved when you quit the app). You can also delete the console history by tapping and holding the '^' button now.

  • Scripts stored in iCloud are now compatible with the built-in "Run Script" and "Edit Script" actions of the (Apple) Shortcuts app. Just prefix the script name/path with "iCloud/", e.g. use "iCloud/MyScript.py" (without quotes).

Built-in Modules

  • Added location.render_map_snapshot function to the location module for generating map images (using Apple Maps data).

  • Improved photos.capture_image function with the option to use the selfie camera by default.

  • Added cb.Peripheral.manufacturer_data in cb (CoreBluetooth) module.

  • Added ui.Label.scales_font and ui.Label.min_font_scale attributes to ui.Label.

  • Added reminders.Reminder.priority and reminders.Reminder.url attributes in the reminders module.

  • Changed the default file type for dialogs.pick_document to 'public.item' (instead of 'public.data', this works better for unknown file types).

  • Added (third-party) emoji module.

  • Added documentation for ui.TextField.begin_editing, ui.TextField.end_editing, and ui.TextField.secure.

Bugfixes

  • Fixed a crash when saving images from the console when access to the photo library has not been granted yet.

  • Fixed an issue with the extra key row hiding console input on 2018 iPad Pros.

  • Fixed a crash when using arrow keys on an external keyboard while the on-screen keyboard is visible.

  • Fixed problems with using iCloud scripts in the share sheet extension.

  • Fixed triple-quoted byte strings and f-strings not being syntax-highlighted correctly.

  • Fixed 'wrench' actions not being saved when invoked from the script library.

  • Fixed broken turtle.pen function.

Miscellaneous

  • Selecting Python 2.7 as the default interpreter shows an "end of life" warning now (Python 2.7 will cease to be officially supported by the Python Software Foundation in 2020).

Have fun testing!

cvp

@omz Very good news, and one more time, thanks for your marvelous app.
Just one question: is what you call "background" shortcut a new mode supplementary to
- full app
- appex
- widget

omz

@cvp A background shortcut is a Siri shortcuts that runs directly in Siri, without launching the app. Does that make things clearer? Sorry if the terminology is a bit confusing in parts, there are just a lot of different kinds of shortcuts now...

cvp

@omz Ok, understood and just tested with success. I already love your new version. thanks

cvp

@omz On previous version, when I launched an home screen shortcut, apps list shows two apps: Pythonista and my script. I hoped we could start a script without starting the full app, like now with Siri or like via appex or via widget...but without Siri, that's the reason of my question

[deleted]

@omz Will you update many old modules? https://github.com/cclauss/pythonista-module-versions They are very very old.

RomSpy

Thanks for the hard work. I will give it a try.

JonB

@omz Alas... crashes ios 9.3.5. I take it older device support has ended now.

victordomingos

Very good news, I will be entering the beta today.

Some packages seem to be in need of an update, maybe the final version may include something with respect to that.

I still have an old iPad 2 (iOS 9) that I use together with my iPhone 7, I also wish that this iPad doesn't get unsupported right now...

caddtec

Soooooo great to have a new version! Thanks @omz for the beta! Just tried out most of my apps, scripts ans unit tests. Everything seems to work perfectly!
Will continue testing and report any error I find.

Again thanks!
D

caddtec

I was just trying the new keyboard PyKeys and notice what seems to be a problem... that whenever I enable it, I see only the small upper part of every buttons unless I show the whole keyboard (I use a physical keyboard by the way). I am on iOS 12 with the new iPad Pro 12.9.
Is it suppose to work that way? Am I the only one that it happens?

sashk

Any plans to include newer version of Python, i.e 3.6.7/8 or 3.7.1/2?

upwart

Any plans to support Pandas?

omz

@caddtec You can tap and hold the ^ button (bottom-right corner) to make the keyboard visible when an external keyboard is connected.

wnMark

@caddtec I had the problem on iOS 11 but not on iOS 12.

@omz Thank you for the beta. I am enjoying the testing

robnee

Any chance on addin a theme element for the stderr console text? The dark red is hard to read with some of the dark themes.

[deleted]

The modules are very very old. Will you update them?

orsharir

Thanks for the update! I've been looking forward to the Siri integration.

Is there any way to pass input to the script, or return an output from it? The potential for Pythonista as a glue between other shortcuts, and the possibility of creating a programmable voice interface is huge -- but it depends on the ability of Pythonista to process input and generate output.

Edit: I've just realized that the apparent lack (unless I missed this option) of native input / output could be mitigated by using the clipboard. I still think it would be better to have native support (less boilerplate steps in the shortcut app), but now I can finally start experimenting with the above ideas. Thanks again for the update!

[deleted]

@upwart For pandas. +1
@sashk And python 2.7.15

ccc

:beer: :beers:

mithrendal

Hi,
I tested the new Beta on my current projects. It run most of the time fine. I had some methods where I had to additionally annotate with @on_main_thread to make it run, which I must not in pythonista 3.2 . But I think this is more correct and I guess v3.2 was just a bit more forgiving in that regard and v3.3. a bit more strict which is fine.

I had an issue though with pythonista-gestures from @mikael :
it gives an key error upon accessing a dictionary each time you trigger a gesture

I opened an issue for this at https://github.com/mikaelho/pythonista-gestures

Due to some restructuring in the new pythonista v3.3, in the end I think it has to be repaired in Gestures.

EDIT: it has been repaired. ;-)

I hope @mikael has also access to the beta :-)

How many seats are there free ?

Now I will have a look at the funny keyboard thing ... ;-)

omz

@orsharir said:

Is there any way to pass input to the script, or return an output from it? The potential for Pythonista as a glue between other shortcuts, and the possibility of creating a programmable voice interface is huge -- but it depends on the ability of Pythonista to process input and generate output.

Unfortunately, there are no APIs from Apple for that, so it's not possible. You can use the clipboard as a crutch though (at least for text-based stuff).

omz

@lpl said:

The modules are very very old. Will you update them?

I'm aware of that. I'll look into updating some of the more important ones.

omz

@robnee said:

Any chance on addin a theme element for the stderr console text? The dark red is hard to read with some of the dark themes.

I'll consider it, thanks for your feedback!

omz

@caddtec said:

I was just trying the new keyboard PyKeys and notice what seems to be a problem... that whenever I enable it, I see only the small upper part of every buttons unless I show the whole keyboard (I use a physical keyboard by the way). I am on iOS 12 with the new iPad Pro 12.9.

Yeah, it's difficult to make it work well in combination with physical keyboards to be honest.

I had a solution that worked better than the current beta, but it was auto-rejected by Apple's App Store validation mechanism because it relied on the keyboard having an "emoji" language, and while that works fine on the device, it's apparently not standard-compliant or whatever.

In general, you can work around this by showing the keyboard manually. You can do this by holding the ^ button in the toolbar above the hidden keyboard (bottom-right corner).

ihf

What are the valid sound_names for the notification.schedule parameter? Also can Pythonista provide an arbitrary sound file, and if so, what is the format?

[deleted]

@omz Openssl 1.0.2f has a serious bug. Please have a checkout and update it. https://bz.apache.org/bugzilla/show_bug.cgi?id=58956
And python3.6.8 is coming out soon. I think 3.6.1 is old. So is 2.7.12.
"To get a newer version of the typing module in Python 3.5 or later, you have to upgrade to a newer Python (bugfix) version. For example, typing in Python 3.6.0 is missing the definition of ‘Type’ – upgrading to 3.6.2 will fix this." https://pypi.org/project/typing/#description

caddtec

@omz Yeah I thought so (about the fact it is difficult with physical keyboard). I’ll just have to make do, it is not so problematic so no worries ;o). However, could be a good idea to do like the emoji keyboard however: when we select the PyKeys, it shows the keyboard by default (on screen) and then when we select another keyboard, let’s say English, then the on-screen keyboard disappear and you can then continue using the physical keyboard as always. IMHO I think I would prefer to show the on-screen keyboard by default instead of having to press the button in the toolbar above the hidden keyboard.
As for the App Store validation, I abandoned a long time ago the idea of understanding! ;o)

And thanks for the feedback!

pyios

+1 for pandas support- if not in this version it would be very welcome in an upcoming version. There is a large audience of university and secondary school users who would benefit from iOS access to pandas.

mikael

@omz, whether a side effect or an intentional improvement, maybe include a note that ARKit now works in the release notes?

mikael

Apple Shortcuts app tries to open Pythonista 2 instead of 3.3 beta. Worked before with 3.2. Using a url with ”pythonista3://” does not seem to be an option.

General problem or a personal problem? Will be fixed when 3.3 goes mainstream?

az

Great job on the beta!

A few small things:
Could it be possible to edit a shortcut to allow it to run in the background after it was created (if someone forgets to enable “background” when they create the shortcut)? I see that right now only the voice command can be changed after creation.

Also, I noticed that the keyboard stays light in the UI editor properties fields although it is dark in the rest of the app.

Thanks, and keep up the great work!

reticulated

@omz - is there any way I can contribute or help?

ie updating modules etc?

I've been playing with some OSS python stuff on iOS here just to figure it all out.

I really don't care to get paid or that Pythonista is a commercial app, it's about the community.

Outside of testing the beta, of course!

cvp

@omz If I correctly understand, the new beta version allows to run a Pythonista script, in background (without starting the full app), when it is launched,
either via a notification
either via a siri shortcut
Could it be possible to launch such a script by a home screen icon?

sulcud

@mikael I try in the shortcuts app “pythonista3://“ and it works well, it open the app, do you have installed Pythonista2?, can be that a reason for the error? I only have installed pythonista3 beta. In the shortcuts apps I use some kind of url wrapper and a url opener so the complete shortcut open itself Pythonista 3

sulcud

@omz
iPhone XS Max Pythonista keyboard never appears.

Hi @omz about two days I upgrade my phone 6 to the xs max. In my iPhone 6 I have the actual beta of Pythonista and the keyboard words well, it appears and it let me ran my scripts, but now in the xs max the keyboard never appears or it appears but it looks like the standard iPhone keyboard and don’t show me any of the shortcuts, I have it enabled and I also try use it with the allow full access functionality but nothing.

The specifications

-iPhone XS Max 256gb
-iOS 12.1.2
-Pythonista 3.3 (330005) beta
-PyKeys enabled
-Full acces enabled (I turn it on to see if them works)
-I also restart my device two times

cvp

@omz If a Pythonista script is launched by Siri as background, it is executed even if Pythonista app is not in the apps list, but when the same script is launched by a notification, with foreground=False, it is only executed when I start Pythonista...
Is this difference normal?

omz

@cvp said:

Could it be possible to launch such a script by a home screen icon?

That's not possible, I'm afraid. Home screen icons always launch the full app.

@sulcud said:

iPhone XS Max Pythonista keyboard never appears.

That's weird, did you do a fresh install of the Pythonista beta on the XS Max, or did you restore a backup? Have you tried disabling the 'PyKeys' keyboard, and then enabling it again? Sorry, I don't have a good explanation right now.

sulcud

@omz I install Pythonista 3 from the backup them I install the beta, I try enabling and disabling pykeys

sulcud

@omz i solve it, i re install the app them i open it and them a install the beta

sashk

@lpl said:

@sashk And python 2.7.15

Nope, Python 2 is dead. Use Python 3 instead.

sashk

@omz is there a shorctus module documentation? I dir'ed it and found what I was looking for, but documentation could have helped.

cvp

@sashk

sashk

@cvp said:

Oh... on iPhone it's not very intuitive to find... :( Thanks though.

omz

@sashk In general, you tap on the (?) button in the console, or on the "Documentation" button in new tabs to get to the documentation. You can then search for shortcuts (or other module names) there.

[deleted]

@sashk said:

@lpl said:

@sashk And python 2.7.15

Nope, Python 2 is dead. Use Python 3 instead.

Specifically, 2.7 will receive bugfix support until January 1, 2020. Not yet, not now.

ttobias

@omz Would it be possible to add some basic Apple Watch support because Apple removed the Shortcuts app on the watch so there's currently no easy way to do some basic programmable stuff on the watch without Siri interaction, at least that I am aware off.

For example I have a shortcut which gets a json via a secret https url and formats the output nicely or another one which triggers same IoT actions.

It would be nice to do this with Pythonista.

General question: Does the TestFlight Beta override the installed app or is this separated?

ihf

Some Apple Watch support would be a great addition and (as has been said) would help fill the void that Apple created when they replaced Workflow with Shortcuts.

dgelessus

@ttobias said:

General question: Does the TestFlight Beta override the installed app or is this separated?

The beta replaces the App Store version. If you already have the App Store version installed and then install the beta through TestFlight, you'll get a warning message saying that you may lose your data - this is generally not the case for Pythonista. (I've been in the Pythonista TestFlight beta since the beginning, and installing a beta has never overwritten my data. But if possible you should make an iTunes backup beforehand, just in case.)

You can also go back to the latest App Store release at any time, by going into your purchases and redownloading Pythonista there. This will replace the beta version, but also leaves your data intact (except perhaps for features that were introduced in the beta).

jsamlarose47

Just to say: the new keyboard is opening up some really exciting possibilities, and aside from everything else that Pythonista offers, this is the kind of functionality I've been wishing for on the iPad for a long time now. I've tried a number of third party keyboards to do more with text in iOS and the vast majority of them have proven disappointing, but this... there's more possible than all of those others put together. Happy days ahead. Hats off to OMZ.

mithrendal

New BETA crashes when I use the new introduced key_command feature

Pythonista completely exists when pressing the a key on the external BT keyboard

# coding: utf-8
import ui
import console

class UIView (ui.View):
    def get_key_commands(self):
        print('get_key_commands')
        return [{'input': 'a'}]
        #return [{'input': 'a', 'modifiers':'cmd'}]

    def key_command(self,sender):
        print('key_command='+str(sender))

def main():
    main_view = UIView(frame=(0, 0, 400, 400))
    main_view.name = 'Key Commands Demo'

    main_view.present('sheet')

if __name__ == '__main__':
    main()
omz

@mithrendal I see thanks. I'll look into it tomorrow, but I think you might be able to move the main_view creation into the global scope (i.e. out of the main function) to make it work, but it's getting pretty late here, and my iPad is busy, so I can't really test this theory right now. I definitely had a working example (just not very pretty) when I posted the last beta.

mithrendal

Hi @omz ,
if I move the main_view creation into the global scope (i.e. out of the main function) it also crashes.

There is another issue with the newest BETA: When you create a custom view (extending ui.View) and add with the help of objc_util a native KeyCommandsView as a subview into that custom view. With the newest BETA that does not work anymore. Whereas it worked with the Beta before and with the current production version. I guess that you also added a KeyCommandsView into the ui.View and it consumes all key events, so the self-done-native way is not working anymore when using a custom view. When not extending the ui.View (e.g. using a pure ui.View) and adding the KeyCommandsView to it, the self-done-native way still works.

Could you also do something for this second issue ?

test case example of the second issue:

# coding: utf-8
from objc_util import *
import ui
import console
UIKeyCommand = ObjCClass('UIKeyCommand')

modifiers = {(1<<17): 'Shift', (1<<18): 'Ctrl', (1<<19): 'Alt', (1<<20): 'Cmd', (1<<21): 'NumPad'}

def keyCommands(_self, _cmd):
    keys =['A']
    cmd_key_flag = 0
    key_commands = []
    for k in keys:
        key_commands.append(UIKeyCommand.keyCommandWithInput_modifierFlags_action_(k, cmd_key_flag, 'keyCommandAction:'))
    commands = ns(key_commands)
    return commands.ptr

def canBecomeFirstResponder(_self, _cmd):
    return True

def keyCommandAction_(_self, _cmd, _sender):
    self = ObjCInstance(_self)
    key_cmd = ObjCInstance(_sender)
    flags = key_cmd.modifierFlags()
    modifier_str = ' + '.join(modifiers[m] for m in list(modifiers.keys()) if (m & flags))
    key_input = key_cmd.input()
    console.hud_alert(str(key_input))


KeyCommandsView = create_objc_class('KeyCommandsView', UIView, [keyCommands, canBecomeFirstResponder, keyCommandAction_])


class CustomUIView (ui.View):
    def will_close(self):
        pass

@on_main_thread
def main():
    #this does not work anymore in latest Beta. E.g console.hud_alert('A') is not called anymore
    main_view = CustomUIView(frame=(0, 0, 400, 400))

    #this still works. console.hud_alert('A') is called 
    #main_view = ui.View(frame=(0, 0, 400, 400))

    v = KeyCommandsView.alloc().init()
    v.becomeFirstResponder()
    ObjCInstance(main_view).addSubview_(v)

    main_view.present('sheet')

if __name__ == '__main__':
    main()
caddtec

Hi @omz,
I have a weird bug... I was working on one of my projects with pyui files. I wanted to change the name of the component (a table view) and to my surprise it deleted the component. Actually, it deleted the component because of the backspace keystroke (since I wanted to change the name). Then I realized that also, any of the direction keys (up, down, left, right) weren’t working as well. All the other keys however are working. I then realized it was the physical keyboard that didn’t work in the pyui file. When I use the on-screen keyboard, everything works including the backspace. And only in the pyui fille display because if, for example, I try to use the backspace key from the physical keyboard from, let’s say the run text field (when you press a few seconds on the « play » icon), it’ll work.

Let me know if you need more info.
D

mithrendal

I tested the new BETA build 330012

it still crashes when I use the in 330007 new introduced key_command feature

Pythonista.app completely exists when pressing the 'a' key on the external BT keyboard

# coding: utf-8
import ui
import console

class UIView (ui.View):
    def get_key_commands(self):
        print('get_key_commands')
        return [{'input': 'a'}]
        #return [{'input': 'a', 'modifiers':'cmd'}]

    def key_command(self,sender):
        print('key_command='+str(sender))

def main():
    main_view = UIView(frame=(0, 0, 400, 400))
    main_view.name = 'Key Commands Demo'

    main_view.present('sheet')

if __name__ == '__main__':
    main()

@omz Do you still have some working example code of the new keycommand API ?

EDIT: OMZ wrote me. Although title is optional as written in the documentation, it must be set in the BETA otherwise it crashes.

so the statement

 return [{'input': 'a', 'title': 'a'}]

repairs keycommands for the BETA. It will be fixed in the coming builds...

Kayt

Ole Zorn has released the first Beta of the next version of Pythonista which has shortcuts support.
http://www.sirihacks.net/

dchevell

@omz regarding passing output: iOS 13 has API's for that! Please support them! :takemymoney:

JoshuaLausch

@omz when is this releasing? Can we get an ipa for the beta cos it’s full

eddo888

Could I also please request that the new "open external file" and "open external directory" api be supported, so I can use Pythonista to access files AND directories in WorkingCopy. Yay Cheers Dave.

manitsy

Will this version will support Pandas ?

mikael

@manitsy, no.

Use Google to search for ”Pythonista issues Pandas”.

eskdale

Just purchased Pythonista 3 and its 3.2 (I had an earlier version as well)
Is this correct 3.3 still not released?
Many Thanks

cvp

@eskdale yes, 3.3 is in beta mode, hoping released soon

videoMonkey

Is there a release timeline? The beta is full and I would like to be able to take advantage of the keyboard.

cvp

@videoMonkey All we can say is that current beta build expires in 61 days

robertiii

Beta has expired....Any way of renewing?

cvp

@robertiii no, but we hope the definitive version will arrive soon

See also this topic

ltddev

Any news?

cvp

@ltddev No but it will come soon. Here is what ole said about "dark mode support", some days ago:

"This is the last feature I wanted to put in the 3.3 release because it's obvious and easy. I still need to make some cuts elsewhere, but I'm happy with this overall, and some future plans and new perspectives are starting to take shape."

Thus, we can be optimistic

[deleted]

"There's many a slip 'twixt the cup and the lip"

Please everyone continue to be patient and compassionate - Ole has publicly said that recent delays are due to his mental health and other personal reasons. It takes time to come back from that kind of thing and the path is rarely linear so his recent progress with feature development and his high levels of communication on Twitter should not be seen as guarantees.

Love to all

Zoot

Ole just tweeted that he plans to submit 3.3 to the app store over the weekend, with a new Test Flight version also being available at that time too! Release notes shown in his tweet as well.

Super exciting! Looking forward to official 3.3 next week hopefully!

Congrats Ole!

ltddev

@Zoot can you clarify the meaning of, "...a new Test Flight version also being available at that time too!"?

My understanding would be once the code goes golden in the app store, it means the release is no longer "in beta" and if that is the case, beta testing for this release is effectively wrapped up and Ole does not need beta testing any more and a beta build would cease. If that is the case, what is the purpose of a "new Testflight version"?

Zoot

Ole wrote: "Here are the App Store release notes I've prepared for Pythonista 3.3. I intend to submit over the weekend, a pre-release version will be on TestFlight as soon as it's finished processing on Apple's servers."

So the implication seems to be that TF will allow access as a "prerelease" between the time it's submitted and whenever it's (hopefully) approved, but that's purely a guess.

mikael

Now available for testing.

mikael

In the Testflight version, under External files, Open..., I can choose between ”Python/Text file” and ”Folder”. If I select folder, I still only see iCloud and ”On this Phone” folders, but no Working Copy repositories.

Am I missing something obvious?

shaun-h

I can see Working Copy and access folders in it (note: I use the Working Copy test flight version), so unsure as to why but I assume you can see Working Copy in the files app.

cvp

I don't use WorkingCopy but I see iCloud, On My iPad, my NAS ip and my Mac ip

mikael

@shaun-h, thanks. I had somehow lost Working Copy in Files. After I enabled it again there I can now open the repos directly in Pythonista – excellent!

cvp

Now, the open external folder also shows an usb Drive connected, and that is a very good news...

omz

The idea is that I still need to finish a few things for the release (mostly app preview video etc.), but I wanted to ensure that users get access to the update a bit earlier because I can’t really foresee how smoothly app review etc. goes, and some people relied on features that were in previous betas, but not in 3.2.

cvp

@omz Welcome back and thanks for the future version. I'm sincerely more than happy that you feel better.

omz

@cvp Thank you!

jmv38

@omz welcome back sir. Thank you for the update.

omz

@jmv38 Thanks to you as well! :)

shinyformica

@omz thanks for the update!

Pythonista has been unbelievably helpful at my work, and continues to impress every day.

mikael

@omz, my sincere thanks to you, as well.

Pythonista and this incredible community have enabled me to keep up and develop my Python knowledge, squeezed in between a non-coding job and a busy family life.

I am not exaggerating when I say that that was the primary thing that enabled me to get a new job, starting a new career next month as a full-time senior Python developer.

Olaf

Happy to see you @omz and the update!

bennr01

@omz Glad to see you in the forums again :)

BTW, in the current beta, the keyboard.set_view() method still has TODO (also document custom view callbacks like kb_should_insert) as the documentation.

omz

@bennr01 said:

BTW, in the current beta, the keyboard.set_view() method still has TODO (also document custom view callbacks like kb_should_insert) as the documentation.

Oops, thanks!

omz

@mikael said:

I am not exaggerating when I say that that was the primary thing that enabled me to get a new job, starting a new career next month as a full-time senior Python developer.

That's amazing, congrats! :)

Blanchot

Dear @omz,

Welcome back! The fact that this forum has continued to be a lively place where regular members help others with their questions and regularly offer their code snippets as solutions to problems is a measure of the love and enthusiasm folks have for pythonista.

That too is amazing!

mithrendal

@Blanchot So true.

@mikael your new job colleagues will be very happy as they get a high skilled and very talented work mate with you!!! Wish you a happy time on your new journey.

technoway

With the latest Pythonista Beta v. 3.3 (330025), installed today, i.e. 20 Feb., 2020, I get the same crash in my App I got with the last Beta.

I tracked it down to the very first line of code that executes in my App! I commented out that line, and my App runs successfully.

That line is:

A great many lines of code are omitted both before and after the code snippet shown.

```if name == "main":
# Prevent iPhone from going to sleep while this program runs.
console.set_idle_timer_disabled(True)

    # Create an instance of a class that derives from ui.View.
    # <code-omitted>

```

If I comment out that one line of code, the program does not crash.

I am running that on an iPhone 6s running IOS 13.3.1

codeprezzer

@technoway said:

With the latest Pythonista Beta v. 3.3 (330025), installed today, i.e. 20 Feb., 2020, I get the same crash in my App I got with the last Beta.

I tracked it down to the very first line of code that executes in my App! I commented out that line, and my App runs successfully.

That line is:

A great many lines of code are omitted both before and after the code snippet shown.

```if name == "main":
# Prevent iPhone from going to sleep while this program runs.
console.set_idle_timer_disabled(True)

    # Create an instance of a class that derives from ui.View.
    # <code-omitted>

```

If I comment out that one line of code, the program does not crash.

I am running that on an iPhone 6s running IOS 13.3.1

I'm having exactly same issue since updating to 3.3 earlier today. Commenting out the "console.set_idle_timer_disabled(True)" helps. iPhone 8 and 13.3.1. Phone reboot not help.

Thanks 👍

omz

Sorry about the issue with console.set_idle_timer_disabled. Please use this workaround for now:


import console

def fix_set_idle_timer_disabled(flag=True):
    from objc_util import on_main_thread
    on_main_thread(console.set_idle_timer_disabled)(flag)
technoway

@omz - Thank you for the workaround.

You do not have to apologize for anything.

Pythonista would have to have many, many, more bugs before it would stop being my favorite App. Thanks for making Python programming available on IOS.

avarnell

@omz do you have a new link for the beta signup? 😊 thank you!

simon_hibbs

@mikael @omz Pythonista played an important role in my career as well. When I was interviewing for my last job they set a programming task to write a custom compression tool for specifically formatted data. I wrote it in Pythonista, mostly on the train on my commute. It was fun, I used a combination of techniques for different fields, including variable length encoding for numeric fields that took a fair amount of bit twiddling. I was able to actually demo it to them in my face to face interview on my iPad. It blew them away, they had no idea you could do something like that on an iPad.