diff options
author | Raymond Hettinger <python@rcn.com> | 2003-04-06 09:01:11 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-04-06 09:01:11 (GMT) |
commit | ff41c48a77b7d1411ce97190c8b8405bdaa261e1 (patch) | |
tree | 94763135f421e0c32c6356e083c4d3521e43cd67 /Lib/plat-mac/icopen.py | |
parent | 50c61d5a6c2c551b31270d78b9e53ccef3fdf7a8 (diff) | |
download | cpython-ff41c48a77b7d1411ce97190c8b8405bdaa261e1.zip cpython-ff41c48a77b7d1411ce97190c8b8405bdaa261e1.tar.gz cpython-ff41c48a77b7d1411ce97190c8b8405bdaa261e1.tar.bz2 |
SF patch #701494: more apply removals
Diffstat (limited to 'Lib/plat-mac/icopen.py')
-rw-r--r-- | Lib/plat-mac/icopen.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Lib/plat-mac/icopen.py b/Lib/plat-mac/icopen.py index d819159..99e866e 100644 --- a/Lib/plat-mac/icopen.py +++ b/Lib/plat-mac/icopen.py @@ -29,7 +29,7 @@ INSTALLATION Put this file in your Python path, and create a file named {Python}:sitecustomize.py that contains: - import icopen + import icopen (If {Python}:sitecustomizer.py already exists, just add the 'import' line to it.) @@ -42,18 +42,18 @@ import __builtin__ _builtin_open = globals().get('_builtin_open', __builtin__.open) def _open_with_typer(*args): - file = apply(_builtin_open, args) - filename = args[0] - mode = 'r' - if args[1:]: - mode = args[1] - if mode[0] == 'w': - from ic import error, settypecreator - try: - settypecreator(filename) - except error: - pass - return file + file = _builtin_open(*args) + filename = args[0] + mode = 'r' + if args[1:]: + mode = args[1] + if mode[0] == 'w': + from ic import error, settypecreator + try: + settypecreator(filename) + except error: + pass + return file __builtin__.open = _open_with_typer @@ -63,4 +63,4 @@ _open_with_typer('test.py', 'w') _open_with_typer('test.txt', 'w') _open_with_typer('test.html', 'w') _open_with_typer('test.foo', 'w') -"""
\ No newline at end of file +""" |