]> granicus.if.org Git - python/commitdiff
Rename the routine to start the target running _start(), with a compatibility
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 23 Jan 2002 22:46:30 +0000 (22:46 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 23 Jan 2002 22:46:30 +0000 (22:46 +0000)
routine start() calling it.

Some suites declare an event start(), which obscures this method, which
causes the class initializer to fail when called with start=1.

Based on bug report and fix suggestion by Jacob Kaplan-Moss.

Mac/Lib/aetools.py

index 00ec18aadc7a441f3391c1cb12f1cc0100c4c74a..ba42f03c1b96c7ea065bcaa114b2b5c187eee241 100644 (file)
@@ -157,15 +157,19 @@ class TalkTo:
                else:
                        self.send_timeout = AppleEvents.kAEDefaultTimeout
                if start:
-                       self.start()
+                       self._start()
                
-       def start(self):
+       def _start(self):
                """Start the application, if it is not running yet"""
                try:
                        self.send('ascr', 'noop')
                except AE.Error:
                        _launch(self.target_signature)
                        
+       def start(self):
+               """Deprecated, used _start()"""
+               self._start()
+                       
        def newevent(self, code, subcode, parameters = {}, attributes = {}):
                """Create a complete structure for an apple event"""