Commits

Just van Rossum  committed 08f0f7f

style police.

  • Participants
  • Parent commits 8bbb593

Comments (0)

Files changed (1)

File pyobjc/Lib/PyObjCTools/AppHelper.py

+"""Application helpers.
+
+Currently only a single function is exported: runEventLoop().
 """
-Application helpers.
 
-Currently only a single function is exported: runEventloop
-"""
 from AppKit import NSApplicationMain, NSApp, NSRunAlertPanel
-import traceback
 import sys
 
+
 def unexpectedErrorAlert():
+    import traceback
     exceptionInfo = traceback.format_exception_only(
         *sys.exc_info()[:2])[0].strip()
     return NSRunAlertPanel("An unexpected error has occurred",
             "Continue", "Quit", None)
 
 
-def runEventLoop(argv = None, unexpectedErrorAlert = unexpectedErrorAlert):
-    """
-    Run the event loop, ask the user if we should continue when 
-    catching exceptions. Use this function instead of NSApplicationMain
+def runEventLoop(argv=None, unexpectedErrorAlert=unexpectedErrorAlert):
+    """Run the event loop, ask the user if we should continue if an
+    exception is caught. Use this function instead of NSApplicationMain().
     """
     if argv is None:
         argv = sys.argv