1"""
2Python <-> Objective-C bridge (PyObjC)
3
4This module defines the core interfaces of the Python<->Objective-C bridge.
5"""
6import sys
7
8# Aliases for some common Objective-C constants
9nil = None
10YES = True
11NO = False
12
13# Import the namespace from the _objc extension
14def _update(g=globals()):
15
16    # Dummy import of copy_reg, needed
17    # for py2app.
18    if sys.version_info[0] == 2:
19        import copy_reg
20
21    import objc._objc as _objc
22    for k,v in _objc.__dict__.iteritems():
23        g.setdefault(k,v)
24_update()
25del _update
26
27#import objc._setup
28
29from objc._convenience import *
30from objc._bridgesupport import *
31
32from objc._dyld import *
33from objc._protocols import *
34from objc._descriptors import *
35from objc._category import *
36from objc._bridges import *
37from objc._compat import *
38from objc._pythonify import *
39from objc._functions import *
40from objc._locking import *
41from objc._context import *
42from objc._properties import *
43
44import objc._pycoder as _pycoder
45
46# Make sure our global autorelease pool is
47# recycled when the interpreter shuts down.
48# This avoids issue1402 in the python
49# bugtracker
50import atexit
51atexit.register(recycleAutoreleasePool)
52