[Python-checkins] python/dist/src/Lib/plat-mac aetools.py,1.3,1.4
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Fri, 28 Mar 2003 15:42:39 -0800
- Previous message: [Python-checkins] python/dist/src/Lib/plat-mac/lib-scriptpackages/Finder Containers_and_folders.py,1.3,1.4 Earlier_terms.py,1.3,1.4 Enumerations.py,1.3,1.4 Files_and_suitcases.py,1.3,1.4 Finder_Basics.py,1.2,1.3 Finder_items.py,1.2,1.3 Obsolete_terms.py,1.2,1.3 Process_classes.py,1.3,1.4 Type_Definitions.py,1.3,1.4 Window_classes.py,1.3,1.4 __init__.py,1.3,1.4
- Next message: [Python-checkins] python/dist/src/Mac/scripts gensuitemodule.py,1.36,1.37
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv27943
Modified Files:
aetools.py
Log Message:
On OSX the finder will return from an open() event before the application
has actually entered its event loop. As a stopgap, allow for a 10 second
grace period.
Index: aetools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/aetools.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** aetools.py 5 Mar 2003 21:16:06 -0000 1.3
--- aetools.py 28 Mar 2003 23:42:37 -0000 1.4
***************
*** 27,30 ****
--- 27,31 ----
import MacOS
import sys
+ import time
from aetypes import *
***************
*** 33,36 ****
--- 34,40 ----
Error = 'aetools.Error'
+ # Amount of time to wait for program to be launched
+ LAUNCH_MAX_WAIT_TIME=10
+
# Special code to unpack an AppleEvent (which is *not* a disguised record!)
# Note by Jack: No??!? If I read the docs correctly it *is*....
***************
*** 175,178 ****
--- 179,190 ----
except AE.Error:
_launch(self.target_signature)
+ for i in range(LAUNCH_MAX_WAIT_TIME):
+ try:
+ self.send('ascr', 'noop')
+ except AE.Error:
+ pass
+ else:
+ break
+ time.sleep(1)
def start(self):
- Previous message: [Python-checkins] python/dist/src/Lib/plat-mac/lib-scriptpackages/Finder Containers_and_folders.py,1.3,1.4 Earlier_terms.py,1.3,1.4 Enumerations.py,1.3,1.4 Files_and_suitcases.py,1.3,1.4 Finder_Basics.py,1.2,1.3 Finder_items.py,1.2,1.3 Obsolete_terms.py,1.2,1.3 Process_classes.py,1.3,1.4 Type_Definitions.py,1.3,1.4 Window_classes.py,1.3,1.4 __init__.py,1.3,1.4
- Next message: [Python-checkins] python/dist/src/Mac/scripts gensuitemodule.py,1.36,1.37
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]