[frames] | no frames]

[ Module Hierarchy | Class Hierarchy ]

# Class Hierarchy

- object: The most base type
  - exceptions.BaseException: Common base class for all exceptions
    - exceptions.Exception: Common base class for all non-exit exceptions.
      - exceptions.StandardError: Base class for all standard Python exceptions that do not represent interpreter exiting.
        - exceptions.AttributeError: Attribute not found.
          - pycocoa.lazily.LazyAttributeError: Raised if an attribute can't be `lazily imported`.
        - exceptions.EnvironmentError: Base class for I/O related errors.
          - exceptions.OSError: OS system call failed.
            - pycocoa.oslibs.OSlibError: Couldn't find or load a macOS `.dylib` library.
        - exceptions.ImportError: Import can't find module, or can't find name in module.
          - pycocoa.lazily.LazyImportError: Raised if `lazy import` is not supported, disabled or failed.
        - exceptions.RuntimeError: Unspecified run-time error.
          - pycocoa.nstypes.NSExceptionError: Python Error wrapping an `ObjC/NSException`.
          - pycocoa.faults.SegfaultError: Error raised instead of SEGFAULT, see module pycocoa.faults.
        - exceptions.ValueError: Inappropriate argument value (of correct type).
          - pycocoa.windows.AutoResizeError: `AutoResize` option error.
          - pycocoa.colors.ColorError: `Color` issue.
          - pycocoa.fonts.FontError: Font selection error.
            - pycocoa.fonts.FontTraitError: Font traits error.
          - pycocoa.octypes.TypeCodeError: Error in ObjC type encoding.
          - pycocoa.windows.WindowError: Window error.
            - pycocoa.windows.WindowStyleError: Window style error.
  - pycocoa.basics.Proxy1ce: Decorator for a lazily evaluated dict or lazily imported module or singleton, avoiding circular imports and providing access to the dict's items or the singleton's or module's attributes.
    - pycocoa.deprecated.module_property_RO: DEPRECATED on 2025.02.09, use `Proxy1ce`.
    - pycocoa.deprecated.proxy_RO: DEPRECATED on 2025.04.03, use `Proxy1ce`.
  - _CData: XXX to be provided
    - _ctypes.Structure: Structure base class
      - pycocoa.octypes.c_struct_t: Base type to pretty-print ctypes `Structures`.
        - pycocoa.octypes.CFRange_t: ObjC `struct` with fields `loc[ation]` and `len[gth]` (both `CFIndex_t`).
        - pycocoa.octypes.NSPoint_t: ObjC `struct` with fields `x` and `y` (both `CGFloat_t`).
        - pycocoa.octypes.NSRange_t: ObjC `struct` with fields `loc[ation]` and `len[gth]` (both `NSUInteger_t`).
        - pycocoa.octypes.NSRect_t: ObjC `struct` with fields `origin` and `size` (`NSPoint_t`, `NSSize_t`).
          - pycocoa.octypes.NSRect4_t: ObjC `struct`, like NSRect_t with different signature and properties.
        - pycocoa.octypes.NSSize_t: ObjC `struct` with fields `width` and `height` (both `CGFloat_t`).
        - pycocoa.printers.PMRect_t: ObjC `struct` with fields `bottom`, `left`, `right` and `top` (`c_double`-s).
          - pycocoa.printers.PaperMargins: Python `PaperMargins` Type, wrapping an ObjC `PMPaperMargins`.
        - pycocoa.octypes.objc_method_description_t: ObjC `struct` with fields `name` and `types` (`SEL_t`, `c_char_p`).
        - pycocoa.octypes.objc_property_attribute_t: ObjC `struct` with fields `name` and `value` (both `c_char_p`).
        - pycocoa.octypes.objc_super_t: ObjC `struct` with fields `receiver` and `class` (`Id_t`, `Class_t`).
    - _ctypes._SimpleCData: XXX to be provided
      - ctypes.c_uint.__ctype_be__
      - ctypes.c_float.__ctype_be__
      - ctypes.c_ushort.__ctype_be__
      - ctypes.c_int.__ctype_be__
      - ctypes.c_double.__ctype_be__
      - ctypes.c_long.__ctype_be__
      - ctypes.c_ulong.__ctype_be__
      - ctypes.c_bool
        - pycocoa.octypes.BOOL_t: ObjC `boolean` type.
      - ctypes.c_double
      - ctypes.c_float
      - ctypes.c_int
      - ctypes.c_long
      - ctypes.c_uint
      - ctypes.c_ulong
      - ctypes.c_ushort
      - ctypes.c_void_p
        - pycocoa.octypes.ObjC_t: Base type to pretty-print ctypes `c_void_p`.
          - pycocoa.octypes.Allocator_t: ObjC `CFAllocatorRef` type.
          - pycocoa.octypes.Block_t: ObjC `block` type.
          - pycocoa.octypes.IMP_t: ObjC `IMPlementation` type.
          - pycocoa.octypes.Id_t: ObjC `Id/self` type, encoding b'@'.
            - pycocoa.octypes.Class_t: ObjC `Class` type, encoding b'#'.
            - pycocoa.octypes.Protocol_t: ObjC `protocol` type.
            - pycocoa.octypes.RunLoop_t: ObjC `CFRunLoopRef` type.
            - pycocoa.octypes.URL_t: ObjC `URL` type.
            - pycocoa.octypes.Union_t: ObjC `union` type.
          - pycocoa.octypes.Ivar_t: ObjC `instance variable` type.
          - pycocoa.octypes.Method_t: ObjC `method` type.
          - pycocoa.octypes.SEL_t: ObjC `SELector/cmd` type, encoding `b':'`.
          - pycocoa.octypes.Struct_t: ObjC `struct` type.
          - pycocoa.octypes.TypeRef_t: ObjC opaque type.
          - pycocoa.octypes.UnknownPtr_t: Unknown pointer.
          - pycocoa.octypes.Unknown_t: Unknown type.
          - pycocoa.octypes.VoidPtr_t: Same as `c_void_p`, but distinguishable from `c_void_p`.
          - pycocoa.octypes.objc_property_t: ObjC `property` Class.
      - ctypes.c_wchar
  - pycocoa.internals._Objectype: Base class with `typename`.
    - pycocoa.runtime._ObjCBase: (INTERNAL) Base class for `runtime.ObjC...` classes.
      - pycocoa.runtime.ObjCBoundMethod: Python wrapper for a bound ObjC instance method, an IMP_t.
        - pycocoa.runtime.ObjCBoundClassMethod: Python wrapper for a bound ObjC class method, only to distinguish bound class from bound instance methods.
      - pycocoa.runtime.ObjCClass: Python wrapper for an ObjC class.
        - pycocoa.runtime.ObjCDelegate: Register the `_NS_Delegate._ObjC` (sub)class and create an ObjCClass`(_NS_Delegate.__name__)`.
      - pycocoa.runtime.ObjCInstance: Python wrapper for an ObjC instance.
        - pycocoa.nstypes.NSDecimal: Optimized, Python `NSDecimalNumber` class.
        - pycocoa.nstypes.NSStr: Python wrapper for the ObjC `NS[Constant]String`.
          - pycocoa.nstypes.at: Acronym NSStr.
        - pycocoa.runtime.ObjCConstant: Python wrapper for an ObjC constant.
      - pycocoa.runtime.ObjCMethod: Python class representing an unbound ObjC instance method, actually an IMP_t.
        - pycocoa.runtime.ObjCClassMethod: Python class representing an unbound ObjC class method, only to distinguish class methods from instance methods.
      - pycocoa.runtime.ObjCSubclass: Python class creating an ObjC sub-class of an existing ObjC (super)class.
    - pycocoa.baseTypes._Type0: (INTERNAL) The base Type, just property NS.
      - pycocoa.colors.Color: Base `Color` class wrapping `NSColor` objects, intended specifically to avoid fatal exceptions when accessing non-applicable `NSColor` attributes.
        - pycocoa.colors.CMYColor: Color in the Cyan-Magenta-Yellow space.
        - pycocoa.colors.GrayScaleColor: Color in the Gray-Scale space.
        - pycocoa.colors.HSBColor: Color in thecHue-Saturation-Brightness space.
        - pycocoa.colors.RGBColor: Color in the Red-Green-Blue space.
        - pycocoa.colors._SystemColor: Dynamic color, adaptable to vibrancy and accessibility settings.
          - pycocoa.colors.TintColor: Dynamic color, adaptable to vibrancy and accessibility settings.
          - pycocoa.colors.UIColor: Dynamic color for User-Interface elements, adaptable to vibrancy and accessibility settings.
      - pycocoa.fonts.Font: Python `Font` Type, wrapping ObjC `NSFont`.
      - pycocoa.sets.FrozenSet: Python `frozenset` Type, wrapping an immutable ObjC `NSSet`.
      - pycocoa.geometry.Point: Python Type, wrapping an ObjC `NSPoint_t`.
        - pycocoa.geometry.Point2: Python Type, like Point, different signature.
      - pycocoa.geometry.Rect: Python Type, wrapping an ObjC NSRect_t.
        - pycocoa.screens.Frame: A screen frame, wrapping ObjC NSRect_t.
        - pycocoa.geometry.Rect4: Python Type, like Rect, but signature as ObjC NSRect4_t.
      - pycocoa.screens.Screen: Screen Python Type, wrapping ObjC NSRect_t.
        - pycocoa.deprecated._DeprecatedScreen: (INTERNAL) DEPRECATED `Screen`s.
          - pycocoa.deprecated.BuiltInScreen: DEPRECATED on 2025.03.16, use `Screens.BuiltIn`.
          - pycocoa.deprecated.DeepestScreen: DEPRECATED on 2025.03.16, use `Screens.Deepest`.
          - pycocoa.deprecated.ExternalScreen: DEPRECATED on 2025.03.16, use `Screens.External`.
          - pycocoa.deprecated.MainScreen: DEPRECATED on 2025.03.16, use `Screens.Main`.
      - pycocoa.sets.Set: Python `set` Type, wrapping an ObjC `NSMutableSet`.
      - pycocoa.geometry.Size: Python Type, wrapping an ObjC `NSSize_t`.
        - pycocoa.geometry.Size2: Python Type, like Size, different signature.
      - pycocoa.strs.Str: Python `str` Type, wrapping (immutable) ObjC `NSStr[ing]`.
        - pycocoa.strs.StrAttd: Python `str` Type, wrapping (immutable) ObjC `NSAttributedString`.
      - pycocoa.strs.StrAttd: Python `str` Type, wrapping (immutable) ObjC `NSAttributedString`.
      - pycocoa.tuples.Tuple: Python `tuple` Type, wrapping an immutable ObjC `NSArray`.
        - pycocoa.lists.List: Python `list` Type, wrapping an ObjC `NSMutableArray`.
      - pycocoa.dicts._FrozenDictBase
        - pycocoa.dicts.FrozenDict: Python immutable `dict` Type, wrapping an (immutable) ObjC `NSDictionary`.
          - pycocoa.dicts.Dict: Python `dict` Type, wrapping an ObjC `NSMutableDictionary`.
      - pycocoa.printers._PM_Type0: (INTERNAL) Base type for ObjC `PM...` objects.
        - pycocoa.printers.Paper: Python `Paper` Type, wrapping an opaque ObjC `PMPaper`.
          - pycocoa.printers.PaperCustom: Create a custom Paper.
        - pycocoa.printers.Printer: Python `Printer` Type, wrapping ObjC `NSPrinter` and `PMPrinter`.
      - pycocoa.baseTypes._Type1: (INTERNAL) Basic Type with properties app, delegate and NS.
        - pycocoa.baseTypes._Type2: (INTERNAL) Basic Type with properties app, delegate, NS, tag and title.
          - pycocoa.panels.AlertPanel: Python Type to show an alert, wrapping ObjC `NSAlert`.
            - pycocoa.panels.ErrorPanel: Python Type to show an `NSError` alert, wrapping ObjC `NSAlert`.
            - pycocoa.panels.TextPanel: Scrollable text panel Python Type, wrapping ObjC `NSAlert`.
          - pycocoa.apps.App: Python `App` Type, wrapping an ObjC `NSApplication`.
          - pycocoa.panels.BrowserPanel: Python Type to show a URL or file.
          - pycocoa.panels.OpenPanel: Python Type to select a file, wrapping ObjC `NSOpenPanel`.
          - pycocoa.panels.SavePanel: Python Type to save a file, wrapping ObjC `NSSavePanel`.
          - pycocoa.tables.Table: Python rows and columns {Table} Type, wrapping an ObjC `NSTableView`.
          - pycocoa.apps.Tile: Dock tile for an App, wrapping an ObjC `NSDockTile`.
          - pycocoa.windows.Window: Basic window Python Type, wrapping ObjC `NSWindow`.
            - pycocoa.windows.MediaWindow: Media window Python Type, wrapping ObjC `NSWindow/NSView`.
            - pycocoa.tables.TableWindow: Python Type for a vertically scrollable window, wrapping ObjC `NSWindow/NSScrollView`.
            - pycocoa.windows.TextWindow: Scrollable text window Python Type, wrapping ObjC `NSWindow/NSView`.
          - pycocoa.menus._Item_Type2: (INTERNAL) Base class for Item and ItemSeparator.
            - pycocoa.menus.Item: Python menu Item Type, wrapping ObjC `NSMenuItem`.
            - pycocoa.menus.ItemSeparator: Python menu ItemSeparator Type, wrapping ObjC `NSMenuItem.separatorItem`.
          - pycocoa.menus._Menu_Type2: (INTERNAL) Base class for Menu and MenuBar.
            - pycocoa.menus.Menu: Python Menu Type, wrapping ObjC `NSMenu`.
            - pycocoa.menus.MenuBar: Python MenuBar Type, wrapping ObjC `NSMenu`.
  - basestring: Type basestring cannot be instantiated; it is the base for str and unicode.
    - str: str(object='') -> string
      - pycocoa.strs.Str: Python `str` Type, wrapping (immutable) ObjC `NSStr[ing]`.
        - pycocoa.strs.StrAttd: Python `str` Type, wrapping (immutable) ObjC `NSAttributedString`.
  - dict: dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list.
    - pycocoa.basics.Adict: A `dict` with key and attribute access to the items and callable to add items.
    - pycocoa.getters._Cache2: Two-level cache implemented by two `dict`s, a primary level-1 `dict` and a secondary level-2 `dict`.
      - pycocoa.deprecated.Cache2: DEPRECATED on 2025.02.15, to be removed.
    - pycocoa.basics._frozendictbase: (INTERNAL) Base class for immutable `dict` types.
      - pycocoa.basics.frozendict: An immutable Python `dict` with key and attribute access to the items.
  - frozenset: frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object
    - pycocoa.sets.FrozenSet: Python `frozenset` Type, wrapping an immutable ObjC `NSSet`.
  - set: set() -> new empty set object set(iterable) -> new set object
    - pycocoa.sets.Set: Python `set` Type, wrapping an ObjC `NSMutableSet`.