Returns a single context.
(contextType=None, resourcesPath=None)
| 29 | contextTypesOSX = ('drawbot',) |
| 30 | |
| 31 | def getContext(contextType=None, resourcesPath=None): |
| 32 | """Returns a single context.""" |
| 33 | |
| 34 | # Sets the default for both supported platforms. |
| 35 | if contextType is None: |
| 36 | if platform == 'linux': |
| 37 | contextType = 'flat' |
| 38 | elif platform == 'darwin': |
| 39 | contextType = 'drawbot' |
| 40 | else: |
| 41 | raise NotImplementedError |
| 42 | |
| 43 | return getPlatformContext(contextType=contextType) |
| 44 | |
| 45 | def getContexts(types): |
| 46 | """Returns multiple contexts, contextTypes should be specified as a |