diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-11-07 23:07:05 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-11-07 23:07:05 (GMT) |
commit | dde800ec4ee704d0c4d6d0b60d74e72e0ea834d8 (patch) | |
tree | 329e6e0e43d662232eb8e3ccc1b5dc22f719bdb3 /Mac/Lib/macresource.py | |
parent | 430b1563dde73ae1dc8f2379bdd29a0b0e5c82eb (diff) | |
download | cpython-dde800ec4ee704d0c4d6d0b60d74e72e0ea834d8.zip cpython-dde800ec4ee704d0c4d6d0b60d74e72e0ea834d8.tar.gz cpython-dde800ec4ee704d0c4d6d0b60d74e72e0ea834d8.tar.bz2 |
Got rid of the python.rsrc resource file. The error message strings and
dialogs are now stored in Mac/Lib, and loaded on demand through macresource.
Not only does this simplify a MacPython based on Apple's Python, but
it also makes Mac error codes come out symbolically when running command
line python (if you have Mac/Lib in your path).
The resource files are copied from Mac/Resources. The old ones will disappear
after the OS9 build procedure has been adjusted.
Diffstat (limited to 'Mac/Lib/macresource.py')
-rw-r--r-- | Mac/Lib/macresource.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Mac/Lib/macresource.py b/Mac/Lib/macresource.py index 3a1161b..26f90940 100644 --- a/Mac/Lib/macresource.py +++ b/Mac/Lib/macresource.py @@ -95,6 +95,11 @@ def open_pathname(pathname, verbose=0): raise return refno +def open_error_resource(): + """Open the resource file containing the error code to error message + mapping.""" + need('Estr', 1, filename="errors.rsrc", modname=__name__) + def _decode(pathname, verbose=0): # Decode an AppleSingle resource file, return the new pathname. newpathname = pathname + '.df.rsrc' |