diff options
author | Guido van Rossum <guido@python.org> | 1995-02-21 21:00:32 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-02-21 21:00:32 (GMT) |
commit | 8656ad5b3008b7de1e6903810a34c63ff2f1a315 (patch) | |
tree | 0fa0a4d44c84dee1cb4d033e7a023bde66f79fa3 /Mac | |
parent | 4410d571a8dbc5ea36dbc78408687e7cb3d2d3fc (diff) | |
download | cpython-8656ad5b3008b7de1e6903810a34c63ff2f1a315.zip cpython-8656ad5b3008b7de1e6903810a34c63ff2f1a315.tar.gz cpython-8656ad5b3008b7de1e6903810a34c63ff2f1a315.tar.bz2 |
a few new things
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/scripts/run.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Mac/scripts/run.py b/Mac/scripts/run.py index 86da024..4fb040d 100644 --- a/Mac/scripts/run.py +++ b/Mac/scripts/run.py @@ -2,6 +2,7 @@ def main(): import sys + sys.stdout = sys.stderr del sys.argv[:1] if not sys.argv: import macfs @@ -16,16 +17,21 @@ def main(): except SystemExit, msg: if msg: message("Exit status: %s" % str(msg)) - sys.exit(msg) + print "exit", `msg` + #sys.exit(msg) except: etype = sys.exc_type if hasattr(etype, "__name__"): etype = etype.__name__ message("%s: %s" % (etype, sys.exc_value)) - sys.exit(1) + print "exit 1" + #sys.exit(1) -def message(str = "Hello, world!", id = 129): +def message(str = "Hello, world!", id = 256): import Dlg d = Dlg.GetNewDialog(id, -1) + if not d: + print str + return tp, h, rect = d.GetDItem(2) Dlg.SetIText(h, str) while 1: |