|
isAlias(path)
Resolve a macOS file or folder alias. |
|
|
|
isLink(path)
Resolve a file or folder link or alias. |
|
|
|
isNone(obj)
Return True if obj is None, NSMain.nil,
NSMain.Null , etc. |
|
|
|
nsArray2listuple(ns,
ctype=<class 'ctypes.c_void_p'>,
typy=None)
Create a Python list or tuple from an
NS[Mutable]Array . |
|
|
|
nsArray2tuple(ns,
ctype=<class 'pycocoa.runtime.ObjCInstance'>,
typy=<type 'tuple'>)
Create a Python tuple from an immutable
NSArray . |
|
|
|
nsBoolean2bool(ns,
dflt=missing)
Create a Python bool from an NSBoolean . |
|
|
|
nsBundleRename(ns_title,
match=' Python ' )
Change the bundle title if the current title matches. |
|
|
|
|
|
|
|
nsDescription2dict(ns,
**defaults)
Create an immutable dict object with key
and attribute access to items by name. |
|
|
|
nsDictionary2dict(ns,
ctype_keys=<class 'ctypes.c_void_p'>,
ctype_vals=<class 'ctypes.c_void_p'>,
typy=None)
Create a Python dict or frozendict from an
NS[Mutable|Frozen]Dictionary . |
|
|
|
|
|
nsException(name=None,
reason=' not given ' ,
**info)
Create an ObjC/NSException instance. |
|
|
|
nsIter(ns,
reverse=False,
keys=False)
Iterate over an NS.. ObjC objects's keys, values or
reverse values. |
|
|
|
nsIter2(ns,
reverse=False,
keys=False)
Iterate over an NS.. ObjC objects's keys or (reverse)
values. |
|
|
|
nsLog(ns_fmt,
*ns_args)
Formatted ObjC write to the console. |
|
|
|
nsLogf(fmtxt,
*args)
Formatted write to the console. |
|
|
|
ns2NSType2(ns)
Get the main NS[Mutable]... class and Python Type. |
|
|
|
nsNull2none(ns)
Return Python None for an NS/CFNull or
nil . |
|
|
|
nsNumber2num(ns,
dflt=missing)
Create a Python Decimal , int or
float from an NSNumber . |
|
|
|
nsOf(inst)
Return the .NS ObjC object of a Python wrapper or Type
instance. |
|
|
|
ns2py(ns,
dflt=missing)
Convert an ObjC class' instance to the equivalent Python standard
type's instance or wrapper and value. |
|
|
|
nsRaise(name=None,
reason=' not given ' ,
**info)
Create an NSException and mimick @throw
NSException . |
|
|
|
nsSet2set(ns,
ctype=<class 'ctypes.c_void_p'>,
typy=None)
Create a Python set or frozenset from an
NS[Mutable]Set . |
|
|
|
nsString2str(ns,
dflt=None)
Create a Python str or unicode from an
NS[Mutable]Str[ing] . |
|
|
|
nsTextSize3(text,
ns_font=None)
Return the size of a multi-line text. |
|
|
|
nsTextView(text,
ns_font,
scroll=50)
Return an NSTextView for the given text string. |
|
|
|
nsThrow(nsExc)
Mimick ObjC's @throw NSException to raise an exception. |
|
|
|
ns2Type(ns)
Convert an NS... ObjC object to an instance of the
corresponding Python Type, capital T!. |
|
|
|
ns2TypeID2(ns,
dflt=None)
Get the NS... ObjC TypeID . |
|
|
|
nsURL2str(ns)
Create a Python str from NSURL string. |
|
|
|
nsValue2py(ns,
dflt=missing)
Create a Python instance from an NS[Concrete]Value . |
|
|
|
__all__ = _ALL_LAZY.nstypes
|
|
NSAlert = ObjCClass('NSAlert')
|
|
NSApplication = ObjCClass('NSApplication')
|
|
NSArray = ObjCClass('NSArray')
|
|
NSAttributedString = ObjCClass('NSAttributedString')
|
|
NSAutoreleasePool = ObjCClass('NSAutoreleasePool')
|
|
NSBezierPath = ObjCClass('NSBezierPath')
|
|
NSBundle = ObjCClass('NSBundle')
|
|
NSColor = ObjCClass('NSColor')
|
|
NSConcreteNotification = ObjCClass('NSConcreteNotification')
|
|
NSConcreteValue = ObjCClass('NSConcreteValue')
|
|
NSConstantString = ObjCClass('NSConstantString')
|
|
NSData = ObjCClass('NSData')
|
|
NSDate = ObjCClass('NSDate')
|
|
NSDecimalNumber = ObjCClass('NSDecimalNumber')
|
|
NSDictionary = ObjCClass('NSDictionary')
|
|
NSDockTile = ObjCClass('NSDockTile')
|
|
NSEnumerator = ObjCClass('NSEnumerator')
|
|
NSError = ObjCClass('NSError')
|
|
NSException = ObjCClass('NSException')
|
|
NSFont = ObjCClass('NSFont')
|
|
NSFontDescriptor = ObjCClass('NSFontDescriptor')
|
|
NSFontManager = ObjCClass('NSFontManager')
|
|
NSFontPanel = ObjCClass('NSFontPanel')
|
|
NSImage = ObjCClass('NSImage')
|
|
NSImageView = ObjCClass('NSImageView')
|
|
NSLayoutManager = ObjCClass('NSLayoutManager')
|
|
NSMenu = ObjCClass('NSMenu')
|
|
NSMenuItem = ObjCClass('NSMenuItem')
|
|
NSMutableArray = ObjCClass('NSMutableArray')
|
|
NSMutableData = ObjCClass('NSMutableData')
|
|
NSMutableDictionary = ObjCClass('NSMutableDictionary')
|
|
NSMutableSet = ObjCClass('NSMutableSet')
|
|
NSMutableString = ObjCClass('NSMutableString')
|
|
NSNotification = ObjCClass('NSNotification')
|
|
NSNotificationCenter = ObjCClass('NSNotificationCenter')
|
|
NSNull = ObjCClass('NSNull')
|
|
NSNumber = ObjCClass('NSNumber')
|
|
NSObject = ObjCClass(_NSObject_)
|
|
NSOpenPanel = ObjCClass('NSOpenPanel')
|
|
NSPageLayout = ObjCClass('NSPageLayout')
|
|
NSPrinter = ObjCClass('NSPrinter')
|
|
NSPrintInfo = ObjCClass('NSPrintInfo')
|
|
NSPrintOperation = ObjCClass('NSPrintOperation')
|
|
NSPrintPanel = ObjCClass('NSPrintPanel')
|
|
NSSavePanel = ObjCClass('NSSavePanel')
|
|
NSScreen = ObjCClass('NSScreen')
|
|
NSScrollView = ObjCClass('NSScrollView')
|
|
NSSet = ObjCClass('NSSet')
|
|
NSStatusBar = ObjCClass('NSStatusBar')
|
|
NSString = ObjCClass('NSString')
|
|
NSTableColumn = ObjCClass('NSTableColumn')
|
|
NSTableView = ObjCClass('NSTableView')
|
|
NSTextField = ObjCClass('NSTextField')
|
|
NSTextView = ObjCClass('NSTextView')
|
|
NSThread = ObjCClass('NSThread')
|
|
NSURL = ObjCClass('NSURL')
|
|
NSValue = ObjCClass('NSValue')
|
|
NSView = ObjCClass('NSView')
|
|
NSWindow = ObjCClass('NSWindow')
|
|
NSBoolean = NSNumber.numberWithBool_
|
|
NSDouble = NSNumber.numberWithDouble_
|
|
NSFloat = NSNumber.numberWithDouble_
|
|
NSInt = NSNumber.numberWithInt_
|
|
NSLong = NSNumber.numberWithLong_
|
|
NSLongLong = NSNumber.numberWithLongLong_
|
|
NSMain = NSMain.Application=NSApplication(<Id_t at 0x7feab0586...
Global ObjC/NS/CF... singletons.
|
|
NSMain.Application
Get the NSApplication.sharedApplication .
|
|
NSMain.BooleanNO
Get NSBoolean(NO) .
|
|
NSMain.BooleanYES
Get NSBoolean(YES) .
|
|
NSMain.Bundle
Get the NSBundle.mainBundle .
|
|
NSMain.BundleName
Get the NS/CFBundleName .
|
|
NSMain.FontManager
Get the NSFontManager.sharedFontManager .
|
|
NSMain.LayoutManager
Get the NSLayoutManager .
|
|
NSMain.NO_false
Get NSfalse/NO .
|
|
NSMain.Null
Get NSNull .
|
|
NSMain.PrintInfo
Get the NSPrintInfo .
|
|
NSMain.Screen
Get the NSScreen.mainScreen , once.
|
|
NSMain.TableColumn
Get a blank NSTableColumn .
|
|
NSMain.YES_true
Get NStrue/YES .
|
|
NSMain.nil
Get NSnil .
|
|
NSMain.stdlog
Get the standard log file (stdout , stderr ,
other).
|
|
NSMain.versionstr
Get the PyCocoa, Python, macOS versions as str .
|