From 39e4613c95937afabb8f1725fef1da9cc5b388d7 2008-07-01 06:49:48 From: Barry Wark Date: 2008-07-01 06:49:48 Subject: [PATCH] revived CocoaFrontendPlugin project --- diff --git a/IPython/frontend/cocoa/plugin/CocoaFrontendPlugin.xcodeproj/project.pbxproj b/IPython/frontend/cocoa/plugin/CocoaFrontendPlugin.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0707de8 --- /dev/null +++ b/IPython/frontend/cocoa/plugin/CocoaFrontendPlugin.xcodeproj/project.pbxproj @@ -0,0 +1,110 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXGroup section */ + 4C96F4FC0E199AB500B03430 = { + isa = PBXGroup; + children = ( + ); + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXLegacyTarget section */ + 4C96F50C0E199AF100B03430 /* Cocoa Frontend Plugin */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(ACTION)"; + buildConfigurationList = 4C96F5110E199B3300B03430 /* Build configuration list for PBXLegacyTarget "Cocoa Frontend Plugin" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/make; + buildWorkingDirectory = ""; + dependencies = ( + ); + name = "Cocoa Frontend Plugin"; + passBuildSettingsInEnvironment = 1; + productName = "Cocoa Frontend Plugin"; + }; +/* End PBXLegacyTarget section */ + +/* Begin PBXProject section */ + 4C96F4FE0E199AB500B03430 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 4C96F5010E199AB500B03430 /* Build configuration list for PBXProject "CocoaFrontendPlugin" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 0; + mainGroup = 4C96F4FC0E199AB500B03430; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4C96F50C0E199AF100B03430 /* Cocoa Frontend Plugin */, + ); + }; +/* End PBXProject section */ + +/* Begin XCBuildConfiguration section */ + 4C96F4FF0E199AB500B03430 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + }; + name = Debug; + }; + 4C96F5000E199AB500B03430 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + }; + name = Release; + }; + 4C96F50D0E199AF100B03430 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + PRODUCT_NAME = "Cocoa Frontend Plugin"; + }; + name = Debug; + }; + 4C96F50E0E199AF100B03430 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = "Cocoa Frontend Plugin"; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4C96F5010E199AB500B03430 /* Build configuration list for PBXProject "CocoaFrontendPlugin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4C96F4FF0E199AB500B03430 /* Debug */, + 4C96F5000E199AB500B03430 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4C96F5110E199B3300B03430 /* Build configuration list for PBXLegacyTarget "Cocoa Frontend Plugin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4C96F50D0E199AF100B03430 /* Debug */, + 4C96F50E0E199AF100B03430 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 4C96F4FE0E199AB500B03430 /* Project object */; +} diff --git a/IPython/frontend/cocoa/plugin/IPythonCocoaFrontendLoader.py b/IPython/frontend/cocoa/plugin/IPythonCocoaFrontendLoader.py new file mode 100644 index 0000000..a3b5478 --- /dev/null +++ b/IPython/frontend/cocoa/plugin/IPythonCocoaFrontendLoader.py @@ -0,0 +1,25 @@ +# encoding: utf-8 +""" +Provides a namespace for loading the Cocoa frontend via a Cocoa plugin. + +Author: Barry Wark +""" +__docformat__ = "restructuredtext en" + +#----------------------------------------------------------------------------- +# Copyright (C) 2008 The IPython Development Team +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#----------------------------------------------------------------------------- + +from PyObjCTools import AppHelper +from twisted.internet import _threadedselect + +#make sure _threadedselect is installed first +reactor = _threadedselect.install() + +# load the Cocoa frontend controller +from IPython.frontend.cocoa.cocoa_frontend import IPythonCocoaController +reactor.interleave(AppHelper.callAfter) +assert(reactor.running)