##// END OF EJS Templates
Removed 'extension.py' example with invalid syntax....
Removed 'extension.py' example with invalid syntax. This was an example with invalid syntax and no actual explanations whatsoever. All examples should contain detailed comments explaining their purpose, otherwise they are useless.

File last commit:

r1263:67f5e0c2
r1584:0eca6692
Show More
IPython1SandboxAppDelegate.py
39 lines | 931 B | text/x-python | PythonLexer
Barry Wark
moved frontend from ipython1-dev. Got engineservice.ThreadedEngineService running, but does nto correctly propagate errors during execute()
r1263 #
# IPython1SandboxAppDelegate.py
# IPython1Sandbox
#
# Created by Barry Wark on 3/4/08.
# Copyright __MyCompanyName__ 2008. All rights reserved.
#
from Foundation import NSObject, NSPredicate
import objc
import threading
from PyObjCTools import AppHelper
from twisted.internet import reactor
class IPython1SandboxAppDelegate(NSObject):
ipythonController = objc.IBOutlet()
def applicationShouldTerminate_(self, sender):
if reactor.running:
reactor.addSystemEventTrigger(
'after', 'shutdown', AppHelper.stopEventLoop)
reactor.stop()
return False
return True
def applicationDidFinishLaunching_(self, sender):
reactor.interleave(AppHelper.callAfter)
assert(reactor.running)
def workspaceFilterPredicate(self):
return NSPredicate.predicateWithFormat_("NOT (self.value BEGINSWITH '<')")