@cvp I found platform.machine() returns meaningful value and I go for this.
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.
Posts made by osamu
-
RE: platform.node() does not return anymore the device (user) name
-
RE: platform.node() does not return anymore the device (user) name
@cvp thank you for your reply.
platform.node() still returned user-assigned name in iOS 16. it changed in iOS 17.
anyway we've got to find some other way in iOS 17. -
platform library does'nt work on iOS17
I inadvertently updated my iOS this morning. On iOS17
import platform
print(platform.node())
returns localhost. It used to return like 'iPhone-XR' or 'iPad-Air'.
Any workaround? -
Pythonista 3 on old iOS
The latest version 3.4 does not run on iOS 12. The old OS has some freedom that later OS has banned. I'm still longing for the app running on old terminals.
-
RE: Has CNContactImageData been changed?
Alright, thanks.
My fault must be the way I restore the image data. Though my old code used to work.
-
RE: Has CNContactImageData been changed?
@cvp Here’s my test script. I’m curious to how it runs on other iOS versions. Pythonista 3 doesn’t run anymore on my iPad Air 1.
—-script
from contacts import *
from objc_util import *entityType = 0 # case contacts
status = ('notDetermined', 'restricted', 'denied', 'authorized')def request_access():
CNContactStore = ObjCClass('CNContactStore').alloc().init()
return int(str(CNContactStore.requestAccessForEntityType(entityType).result_(None)))result = "authorized" if is_authorized() else "denied"
print(f"Module contacts is {result}")result = status[_request_access()]
print(f"Module objc_util is {result}")—-result on my iPhone XR
Module contacts is authorized
Module objc_util is restrictedSeems like module contacts is fully granted, while objc_util is not.
-
Has CNContactImageData been changed?
I have developed the library compatible w/ contacts, and yet handle Google contacts at the same time, importing obj_util library.
After upgrading iOS to 16.4.1, contact.image_data of my library returns funny string as follows;
{length = 4107, bytes = 0xffd8ffe0 00104a46 4946001 0100001 ... cd7d516a 86cfffd9 }This is the data as it is, " ... " is NOT my abbreviation.
Standard contacts library works just fine.
Does anybody know if there has been any change to iOS? Was image data banned just like note was?
-
RE: Pythonista 3.4 is out!
Here’s what I found. /private/var/containers/Bundle/Application/3F29D549-49B5-4FBA-88A4-E717CD2672B6/Pythonista3.app/Frameworks/Py3Kit.framework/Py3Kit | Reason: no suitable image found. — could be the cause of trouble🤔
—-
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Description: DYLD, Library not loaded: @rpath/freetype.framework/freetype | Referenced from: /private/var/containers/Bundle/Application/3F29D549-49B5-4FBA-88A4-E717CD2672B6/Pythonista3.app/Frameworks/Py3Kit.framework/Py3Kit | Reason: no suitable image found. Did find: | /private/var/containers/Bundle/Application/3F29D549-49B5-4FBA-88A4-E717CD2672B6/Pythonista3.app/Frameworks/freetype.framework/freetype: missing LC_DYLD_INFO load command | /private/var/containers/Bundle/Application/3F29D549-49B5-4FBA-88A4-E717CD2672B6/Pythonista3.app/Frameworks/freetype.framework/freetype: missing LC_DYLD_INFO load command
Triggered by Thread: 0 -
RE: Pythonista 3.4 is out!
Congrats on the version up!
Sadly it crashes on my old iPad Air running iOS 12.5.7😢
iOS 12 is extremely valuable to me because it can still access notes field of contacts. -
RE: Since IOS 15 requests always gives me an SSL Certificate Error.
@JonB
It also worked for geocode nominatim query. Thanks 🙏 -
RE: Date Picker w/ blank year
@cvp one last question.
Can I set the initial year?
The following does not work.class MyUIPickerView(ui.View): def __init__(self, data, horiz=False,myRowHeight=100, myDidSelectRow=None, **kwargs): super().__init__(**kwargs) UIPickerView = ObjCClass('UIPickerView') self._picker_view = UIPickerView.alloc().initWithFrame_(ObjCInstance(self).bounds()).autorelease() ObjCInstance(self).addSubview_(self._picker_view) ... self._picker_view.selectedRow = XXX
Thanks in advance.
-
RE: Date Picker w/ blank year
@cvp This script initializes the year as 2019. If I set;
years = [str(y) for y in range(1605,datetime.now().year+1)] + ['----']
the initial year is set to 1605 and we’re far away from —— and recent years. Can we control this initial value? -
RE: Date Picker w/ blank year
@cvp I tried the first version but Pythonista claimed create_objc_class() is missing. There may be some more. I guess I need to sneak into your library and steal them.
-
RE: Date Picker w/ blank year
@cvp Thank you very much indeed for spending time 🙏
This picker is the one that shows up when you enter birthday and other dates when using contacts app. I’m going to try your code.