from PyObjCTools import AppHelper import objc objc.setVerbose(1) # Import document classes import pythonfile import PyDETextView AppHelper.runEventLoop()