@luis-murillo pandas was added to Pythonista in the last update.
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.
Latest posts made by ChelsWin
-
RE: Add event to calendar
@brumm said in Add event to calendar:
calendarapp with recurrences
Thanks, I will take a look. Did you ever get around to writing that ObjC tutorial that you mentioned in the bottom of that thread?
-
RE: Add event to calendar
@cvp said in Add event to calendar:
@ChelsWin said
Is there a way to view errors when it crashes
Yes, use faulthandler from https://github.com/dgelessus/pythonista_startup/blob/master/enable_faulthandler.py
But in this case, you get a "Segmentation fault" without help to solve it. Frequent since last Pythonista update
Thanks for that. It will definitely come in handy in the future.
-
RE: Add event to calendar
@cvp I used to use this code I found online a few years back. It use to work but doesn’t anymore. When I run it, Pythonista crashes. Is there a way to view errors when it crashes?
from objc_util import * from ctypes import POINTER import threading def add_to_calendar(title, s_date, e_date): store = ObjCClass("EKEventStore").alloc().init() access_granted = threading.Event() def completion(_self, granted, _error): access_granted.set() completion_block = ObjCBlock(completion, argtypes=[c_void_p, c_bool, c_void_p]) store.requestAccessToEntityType_completion_(0, completion_block) access_granted.wait() event = ObjCClass("EKEvent").eventWithEventStore_(store) event.title = title # event.allDay = True dateFormat = ObjCClass("NSDateFormatter").alloc().init() dateFormat.setDateFormat_("yyyyMMdd HH:mm") date1 = dateFormat.dateFromString_(s_date) date2 = dateFormat.dateFromString_(e_date) event.startDate = date1 event.endDate = date2 event.setCalendar_(store.defaultCalendarForNewEvents()) LP_c_void_p = POINTER(c_void_p) err = LP_c_void_p() store.saveEvent_span_error_(event, 0, err) print("Event successfully added!") if __name__ == "__main__": title = "Test" d1 = "20230808 00:00" d2 = "20230808 00:10" add_to_calendar(title, d1, d2)
-
Add event to calendar
Hello, I am trying to add an event to my iOS calendar with Pythonista. I have found scripts online from a few years ago that used to work but don’t seem to work for me anymore. I was wondering if someone could point me in the write direction of how to do it? I need to add multiple events with a title and each event will be an all day event.
-
Take a square photo
Hello, is there a way to use photos.capture_image() to take a square photo instead?
-
RE: Force a Pythonista iCloud file to be locally downloaded before accessing it
That's handy. Would it be possible to force download all the music I have brought through the iTunes Store into the music app somehow? Right now I am having to download albums individually and it would be really neat if I could download them all with a Python script.