diff options
author | Guido van Rossum <guido@python.org> | 1995-02-19 15:59:49 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-02-19 15:59:49 (GMT) |
commit | 9784295b157ac9db30d52708f67d115c397290ab (patch) | |
tree | 066d7b16e5515db0de5e13efdde2709d1463140b /Mac/Lib/test | |
parent | 295d171650758106cd4c24410f5a5c0740b914b2 (diff) | |
download | cpython-9784295b157ac9db30d52708f67d115c397290ab.zip cpython-9784295b157ac9db30d52708f67d115c397290ab.tar.gz cpython-9784295b157ac9db30d52708f67d115c397290ab.tar.bz2 |
another round... ported to __SC__
Diffstat (limited to 'Mac/Lib/test')
-rw-r--r-- | Mac/Lib/test/aete.py | 10 | ||||
-rw-r--r-- | Mac/Lib/test/echo.py | 17 |
2 files changed, 18 insertions, 9 deletions
diff --git a/Mac/Lib/test/aete.py b/Mac/Lib/test/aete.py index 205fbdb..21fff61 100644 --- a/Mac/Lib/test/aete.py +++ b/Mac/Lib/test/aete.py @@ -11,7 +11,7 @@ import StringIO from Res import * def main(): - filename = raw_input("Listing file? (default stdout): ") + filename = "" redirect(filename, realmain) def redirect(filename, func, *args): @@ -27,14 +27,14 @@ def redirect(filename, func, *args): def realmain(): #list('C:System Folder:Extensions:AppleScript\252') #list('C:Tao AppleScript:Finder Liaison:Finder Liaison 1.0') - #list('C:Tao AppleScript:Scriptable Text Editor') + list('C:Tao AppleScript:Scriptable Text Editor') #list('C:Internet:Eudora 1.4.2:Eudora1.4.2') #list('E:Excel 4.0:Microsoft Excel') #list('C:Internet:Netscape 1.0N:Netscape 1.0N') #find('C:') - find('D:') - find('E:') - find('F:') + #find('D:') + #find('E:') + #find('F:') def find(dir, maxlevel = 5): hits = [] diff --git a/Mac/Lib/test/echo.py b/Mac/Lib/test/echo.py index 12fbf92..616f712 100644 --- a/Mac/Lib/test/echo.py +++ b/Mac/Lib/test/echo.py @@ -6,14 +6,21 @@ especially to figure out all the different forms an object specifier can have (without having to rely on Apple's implementation). """ +import addpack +addpack.addpack('Demo') +addpack.addpack('bgen') +addpack.addpack('ae') +addpack.addpack('evt') + +import sys +sys.stdout = sys.stderr +import traceback +import MacOS import AE from AppleEvents import * import Evt from Events import * import aetools -import sys -import MacOS -import traceback kHighLevelEvent = 23 # Not defined anywhere for Python yet? @@ -49,6 +56,9 @@ class EchoServer: def mainloop(self, mask = everyEvent, timeout = 60*60): while 1: + self.dooneevent(mask, timeout) + + def dooneevent(self, mask = everyEvent, timeout = 60*60): got, event = Evt.WaitNextEvent(mask, timeout) if got: self.lowlevelhandler(event) @@ -116,4 +126,3 @@ def code(x): if __name__ == '__main__': main() -else: main() |