]> granicus.if.org Git - python/commitdiff
Add missing svn:eol-style property to text files.
authorTim Peters <tim.peters@gmail.com>
Sun, 11 Jun 2006 19:43:49 +0000 (19:43 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 11 Jun 2006 19:43:49 +0000 (19:43 +0000)
Lib/idlelib/macosxSupport.py

index d55dbcbde80bf67f4515cf984c2fde178d388967..10b9aa57038e1c5f2eae106fc1b768689f9a008a 100644 (file)
@@ -1,36 +1,36 @@
-"""\r
-A number of function that enhance IDLE on MacOSX when it used as a normal\r
-GUI application (as opposed to an X11 application).\r
-"""\r
-import sys\r
-\r
-def runningAsOSXApp():\r
-    """ Returns True iff running from the IDLE.app bundle on OSX """\r
-    return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0])\r
-\r
-def addOpenEventSupport(root, flist):\r
-    """\r
-    This ensures that the application will respont to open AppleEvents, which\r
-    makes is feaseable to use IDLE as the default application for python files.\r
-    """\r
-    def doOpenFile(*args):\r
-        for fn in args:\r
-            flist.open(fn)\r
-\r
-    # The command below is a hook in aquatk that is called whenever the app\r
-    # receives a file open event. The callback can have multiple arguments,\r
-    # one for every file that should be opened.\r
-    root.createcommand("::tk::mac::OpenDocument", doOpenFile)\r
-\r
-def hideTkConsole(root):\r
-    root.tk.call('console', 'hide')\r
-\r
-\r
-def setupApp(root, flist):\r
-    """\r
-    Perform setup for the OSX application bundle.\r
-    """\r
-    if not runningAsOSXApp(): return\r
-\r
-    hideTkConsole(root)\r
-    addOpenEventSupport(root, flist)\r
+"""
+A number of function that enhance IDLE on MacOSX when it used as a normal
+GUI application (as opposed to an X11 application).
+"""
+import sys
+
+def runningAsOSXApp():
+    """ Returns True iff running from the IDLE.app bundle on OSX """
+    return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0])
+
+def addOpenEventSupport(root, flist):
+    """
+    This ensures that the application will respont to open AppleEvents, which
+    makes is feaseable to use IDLE as the default application for python files.
+    """
+    def doOpenFile(*args):
+        for fn in args:
+            flist.open(fn)
+
+    # The command below is a hook in aquatk that is called whenever the app
+    # receives a file open event. The callback can have multiple arguments,
+    # one for every file that should be opened.
+    root.createcommand("::tk::mac::OpenDocument", doOpenFile)
+
+def hideTkConsole(root):
+    root.tk.call('console', 'hide')
+
+
+def setupApp(root, flist):
+    """
+    Perform setup for the OSX application bundle.
+    """
+    if not runningAsOSXApp(): return
+
+    hideTkConsole(root)
+    addOpenEventSupport(root, flist)