summaryrefslogtreecommitdiffstats
path: root/Lib/user.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-12 00:43:29 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-12 00:43:29 (GMT)
commit016880229a369a3fb419f3eed28b6db7c342fe71 (patch)
tree9b11de5c197bc556dd515e035327673765cd4871 /Lib/user.py
parent41eaedd3613cebc83e6b9925499369992c7a7770 (diff)
downloadcpython-016880229a369a3fb419f3eed28b6db7c342fe71.zip
cpython-016880229a369a3fb419f3eed28b6db7c342fe71.tar.gz
cpython-016880229a369a3fb419f3eed28b6db7c342fe71.tar.bz2
Kill execfile(), use exec() instead
Diffstat (limited to 'Lib/user.py')
-rw-r--r--Lib/user.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/user.py b/Lib/user.py
index e550e52..99efd2d 100644
--- a/Lib/user.py
+++ b/Lib/user.py
@@ -12,7 +12,7 @@ that wishes to use the mechanism must execute the statement
import user
The user module looks for a file .pythonrc.py in the user's home
-directory and if it can be opened, execfile()s it in its own global
+directory and if it can be opened and read, exec()s it in its own global
namespace. Errors during this phase are not caught; that's up to the
program that imports the user module, if it wishes.
@@ -42,4 +42,4 @@ except IOError:
pass
else:
f.close()
- execfile(pythonrc)
+ exec(open(pythonrc).read())