• filippocld

    It also happened to me when the app or the script running try to access a restricted part of the memory or when there is not enough RAM

    Since your script does not crash on my ipad pro 2017 (4GBs of RAM) too, i believe it's the second option

    posted in Pythonista read more
  • filippocld

    It is possible, @omz just has to set “.md” as a compatible file extension in the Editorial’s info.plist file

    Even better would be a QuickLook extension, which lets you preview the file directly in the Files app

    posted in Editorial read more
  • filippocld

    I believe you have to this from a Mac by reading all iCloud tabs, if i try and succeed i'll tell you :-)

    posted in Editorial read more
  • filippocld

    @rtorot there's the objc_util module and with it you can do anything if you know objective c and ctypes

    posted in Editorial read more
  • filippocld

    The big advantage of editorial is that you can extend all the app's functionality through the Python programming language. (And by all i mean you could theoretically make an app in editorial, if you know how to use Objective-C).
    But there are more user friendly modules such as the ui module which lets you create simple user interfaces.

    If you don't know how to use python there is still a block based workflow system which is pretty powerful. And you can still build UIs with that.

    Editorial also includes an handy web browser (i am not sure if 1Writer has it)

    Plus if i am not mistaken there's an update coming in the future :-)

    posted in Editorial read more
  • filippocld

    Yeah, it takes a bit more but it's usable. Let's hope for some speed in the future :-)

    posted in Pythonista read more
  • filippocld

    Maybe it can be used for most cases. I'd really like this syntax

    posted in Pythonista read more
  • filippocld

    What does ObjCInstance(self).tag=hash('SideBar') do?

    posted in Pythonista read more
  • filippocld

    When iOS 10 was released i did this script to show a notification. The problem is the two action buttons are not shown. Does anyone know what is the problem?

    from objc_util import *
    import random
    
    load_framework('UserNotifications')
    
    nc = ObjCClass('UNUserNotificationCenter').currentNotificationCenter()
    nc.requestAuthorizationWithOptions_completionHandler_(4L, None)
    
    err = None
    d = NSDictionary.dictionary() #empty dict
    
    # imgurl = nsurl('file:///private/var/mobile/Containers/Shared/AppGroup/09FE1A2B-E1E5-4112-B78F-665929FD7600/Pythonista3/Documents/Objective-C/swift.png') #gets deleted somehow...
    imgurl = nsurl('file:///var/containers/Bundle/Application/586AFA89-329A-4E66-9221-2D9EA78A4F46/Pythonista3.app/AppIcon60x60@3x.png')  # Must be a local file
    
    action = ObjCClass("UNNotificationAction").alloc()._initWithIdentifier_title_options_('firstButton', 'First', d)
    action.isAuthenticationRequired = True
    #action.isDestructive = True  # Red Text
    
    textaction=ObjCClass("UNTextInputNotificationAction").alloc()._initWithIdentifier_title_options_textInputButtonTitle_textInputPlaceholder_('textInput','Title',d,'InputButtonTitle','Placeholder')
    
    category = ObjCClass("UNNotificationCategory").alloc()._initWithIdentifier_actions_minimalActions_intentIdentifiers_options_('pythonista', [action,textaction], [action,textaction], d, d)
    
    nc.setNotificationCategories_([category])
    
    attachment1 = ObjCClass("UNNotificationAttachment").attachmentWithIdentifier_URL_options_error_('pythonistaimg', imgurl, d, err)
    
    content = ObjCClass("UNMutableNotificationContent").new()
    content.setCategoryIdentifier_('pythonista')
    content.title = 'Hello, iOS 10'
    content.subtitle = 'Introduction to Notifications'
    content.shouldAddToNotificationsList = True
    content.badge = random.randint(1, 100)
    content.body = "Let's talk about notifications!"
    content.shouldAlwaysAlertWhileAppIsForeground = True
    #content.attachments = [attachment1] #Commemted for debug purposes
    
    trigger = ObjCClass("UNTimeIntervalNotificationTrigger").alloc()._initWithTimeInterval_repeats_(1, False)
    request = ObjCClass("UNNotificationRequest").alloc()._initWithIdentifier_content_trigger_('pythonistaNotification', content, trigger)
    
    nc.addNotificationRequest_(request)
    

    The Notification is shown but has no buttons.
    I've seen people say "you have to specify a delegate" but i've seen others that don't use it. So I dunno

    Thanks in advance,
    Filippo

    posted in Pythonista read more
  • filippocld

    I am not 100% sure but since iOS is sandboxed I don't think it can be done

    posted in Pythonista read more
  • filippocld

    Maybe you can download the cert, but the signing part should be done by Xcode codesign, so i don't think that's possible

    posted in Pythonista read more
  • filippocld

    Yeah, with the template you can pretty much make a full IDE and with a lot of effort remake Pythonista itself

    posted in Pythonista read more
  • filippocld

    @ccc Yeah, i just followed the style that @cook used

    posted in Pythonista read more
  • filippocld

    I modified in my script this line to set the label textcolor. I think it is easier to use this than sliderclass.label.text_color

    self.label.text_color = kwargs['text_color'] if 'text_color' in kwargs else 0.7
    

    posted in Pythonista read more
  • filippocld

    Oh, ok i didn't remember

    posted in Pythonista read more
  • filippocld

    @lukaskollmer Made a pull request to store the most recent Author's name in a keychain (it will usually be the same)

    https://github.com/lukaskollmer/pythonista-scripts/pull/10

    P.s. Why do you store these scripts in a repo instead of having them as separate gists?

    posted in Pythonista read more
  • filippocld

    Nice! Very Interesting

    posted in Pythonista read more
  • filippocld

    Yes, please delete that link...

    posted in Pythonista read more
  • filippocld

    Maybe it is only the notification module...

    posted in Pythonista read more
  • filippocld

    I noticed that running a script after running it in the today widget gives the notimplementederror if the script has a non supported module (the interpreter thinks you are still in the widget)

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!