Mercurial > cpython-lru_cache-weakref
comparison Mac/scripts/RunLibScript.py @ 19488:42b2f1936254 legacy-trunk
Import the MacOS toolbox modules from the Carbon package.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Sat, 25 Aug 2001 12:15:04 +0000 |
| parents | fc77e34ef274 |
| children |
comparison
equal
deleted
inserted
replaced
| 19487:3e68e1a02ad2 | 19488:42b2f1936254 |
|---|---|
| 4 | 4 |
| 5 import imp | 5 import imp |
| 6 import sys | 6 import sys |
| 7 import os | 7 import os |
| 8 import string | 8 import string |
| 9 import Dlg | 9 from Carbon import Dlg |
| 10 import macfs | 10 import macfs |
| 11 | 11 |
| 12 DIALOG_ID = 512 | 12 DIALOG_ID = 512 |
| 13 OK = 1 | 13 OK = 1 |
| 14 CANCEL = 2 | 14 CANCEL = 2 |
| 81 argv = Dlg.GetDialogItemText(h) | 81 argv = Dlg.GetDialogItemText(h) |
| 82 return name, argv, stdin, stdout, wdir, pause | 82 return name, argv, stdin, stdout, wdir, pause |
| 83 | 83 |
| 84 def main(): | 84 def main(): |
| 85 curdir = os.getcwd() | 85 curdir = os.getcwd() |
| 86 import Res | 86 from Carbon import Res |
| 87 try: | 87 try: |
| 88 Res.FSpOpenResFile('RunLibScript.rsrc', 1) | 88 Res.FSpOpenResFile('RunLibScript.rsrc', 1) |
| 89 except: | 89 except: |
| 90 pass # Assume we're an applet already | 90 pass # Assume we're an applet already |
| 91 name, argv, stdin, stdout, wdir, pause = interact() | 91 name, argv, stdin, stdout, wdir, pause = interact() |
