diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-09-01 22:36:29 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-09-01 22:36:29 (GMT) |
commit | a5ffeb69ab814618d9b4d77eba3aa2e03b1b9625 (patch) | |
tree | 32e0aefa3cd84aa01e6f27b8f67bb6558a2c778c /Mac/Lib | |
parent | 822218b400d0f77636592e6786f9bb4f8fad6a43 (diff) | |
download | cpython-a5ffeb69ab814618d9b4d77eba3aa2e03b1b9625.zip cpython-a5ffeb69ab814618d9b4d77eba3aa2e03b1b9625.tar.gz cpython-a5ffeb69ab814618d9b4d77eba3aa2e03b1b9625.tar.bz2 |
Added preferences/startup options for division warning
and accepting unix-style newlines on input.
Diffstat (limited to 'Mac/Lib')
-rw-r--r-- | Mac/Lib/pythonprefs.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Mac/Lib/pythonprefs.py b/Mac/Lib/pythonprefs.py index 0ae3e36..da28d02 100644 --- a/Mac/Lib/pythonprefs.py +++ b/Mac/Lib/pythonprefs.py @@ -16,14 +16,14 @@ OVERRIDE_POPT_ID = 229 OVERRIDE_GUSI_ID = 10241 # version -CUR_VERSION=7 +CUR_VERSION=8 preffilename = PstringLoader(AnyResLoader('STR ', resname=PREFNAME_NAME)).load() pref_fss = preferencefile(preffilename, 'Pyth', 'pref') class PoptLoader(VersionLoader): def __init__(self, loader): - VersionLoader.__init__(self, "bbbbbbbbbbbbbb", loader) + VersionLoader.__init__(self, "bbbbbbbbbbbbbbbb", loader) def versioncheck(self, data): if data[0] == CUR_VERSION: @@ -51,7 +51,7 @@ class GusiLoader: newdata = tp + cr + self.data[8:] self.loader.save(newdata) -popt_default_default = NullLoader(chr(CUR_VERSION) + 8*'\0') +popt_default_default = NullLoader(chr(CUR_VERSION) + 14*'\0' + '\001') popt_default = AnyResLoader('Popt', POPT_ID, default=popt_default_default) popt_loader = ResLoader(pref_fss, 'Popt', POPT_ID, default=popt_default) popt = PoptLoader(popt_loader) @@ -85,7 +85,8 @@ class PythonOptions: dict['version'], dict['inspect'], dict['verbose'], dict['optimize'], \ dict['unbuffered'], dict['debugging'], dummy, dict['keep_console'], \ dict['nointopt'], dict['noargs'], dict['tabwarn'], \ - dict['nosite'], dict['nonavservice'], dict['delayconsole'] = flags + dict['nosite'], dict['nonavservice'], dict['delayconsole'], \ + dict['divisionwarn'], dict['unixnewlines'] = flags return dict def save(self, dict): @@ -96,7 +97,8 @@ class PythonOptions: flags = dict['version'], dict['inspect'], dict['verbose'], dict['optimize'], \ dict['unbuffered'], dict['debugging'], 0, dict['keep_console'], \ dict['nointopt'], dict['noargs'], dict['tabwarn'], \ - dict['nosite'], dict['nonavservice'], dict['delayconsole'] + dict['nosite'], dict['nonavservice'], dict['delayconsole'], \ + dict['divisionwarn'], dict['unixnewlines'] self.popt.save(flags) def AppletOptions(file): |