• JonB

    Someone, maybe @mikael or @polymerchm used to have a pyui editor, which let you change the heirarchical relationship of UI.Views.

    Pyui's are just json files, so you can also just edit them directly.

    posted in Pythonista read more
  • JonB

    bytes.fromhex('4098ADA356C401')

    posted in Pythonista read more
  • JonB

    That thread was yours ;)

    Make sure you are doing it on_main_thread, and for whatever reason a c_void_p seems more robust than py_object restype.

    posted in Pythonista read more
  • JonB

    pyObject() works, but you have to manually set the restype/argtypes. If the view is visible, I think you are guaranteed that it has not been gc'd, though any callbacks need to be careful to import what it needs explicitly within the callback, since module level imports may have been cleared. Also, callbacks should not use any globals.

    posted in Pythonista read more
  • JonB

    Use wifi. Bluetooth is sort of unreliable in pythonista, in my experience. Sometimes things disconnect for no obvious reason. Sometimes peripherals are not detected second time around. etc.

    posted in Pythonista read more
  • JonB

    I guess I don't understand the reason not to use wifi... You can talk to more than one device on wifi, why would you lose access? Bluetooth communication is really annoying.

    posted in Pythonista read more
  • JonB

    Bluetooth in pythonista is tricky, especially with multiple devices. Since cb module doesn't expose all of the delegate input args, you often cannot tell which peripheral is calling back.

    posted in Pythonista read more
  • JonB

    FWIW:

    from ui import *
    from objc_util import *
    uiimage=ObjCClass('UIImage')
    v=Image.named('test:Lenna')
    u=uiimage.systemImageNamed_('lessthan.circle')
    v.objc_instance._setImageAsset_(u.imageAsset())
    

    Leading underscore did the trick, iPadOS 13.1.3.
    Maybe not the most future proof, but does the job...

    posted in Pythonista read more
  • JonB

    @mikael @cvp have you tried setting customWords attrib of the request? Or, turn off usesLanguageCorrection? (Since the language is en-US you DON'T want language correction when trying to detect other languages!)

    I gather they are looking for words you'd find in an English dictionary. So perhaps façade, or tête-à-tête might recognize, while other examples wouldn't?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!