Python Foundation.NSObject() Examples
The following are 1
code examples of Foundation.NSObject().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
Foundation
, or try the search function
.
Example #1
Source File: utils.py From happymac with MIT License | 5 votes |
def __init__(self, interval, callback): global OnMainThread super(Timer, self).__init__(name="Timer for %ds for %s" % (interval, callback)) OnMainThread = type('OnMainThread', (Foundation.NSObject,), dict(OnMainThread.__dict__)) self.callback = OnMainThread.alloc().initWithCallback_(callback) self.interval = interval