summaryrefslogtreecommitdiff
path: root/Lib/cmd.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-11-05 10:43:02 +0000
committerGuido van Rossum <guido@python.org>1992-11-05 10:43:02 +0000
commit84a016ebe780fa74cf3957cfd90f06a2a6258bfa (patch)
tree812dcbc9fd664f9a5354e3301d7aa2375d85517a /Lib/cmd.py
parent4ce65716c423aac0bdbe00e1ff1913f7f0116e7e (diff)
downloadcpython-84a016ebe780fa74cf3957cfd90f06a2a6258bfa.tar.gz
* change default line numbers for 'list' in pdb.py
* changed eval() into getattr() in cmd.py * added dirname(), basename() and (dummy) normath() to macpath.py * renamed nntp.py to nntplib.py * Made string.index() compatible with strop.index() * Make string.atoi('') raise string.atoi_error rather than ValueError * Added dirname() and normpath() to posixpath.
Diffstat (limited to 'Lib/cmd.py')
-rw-r--r--Lib/cmd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/cmd.py b/Lib/cmd.py
index e07019f2a8..eedf613d4e 100644
--- a/Lib/cmd.py
+++ b/Lib/cmd.py
@@ -37,7 +37,7 @@ class Cmd:
return self.default(line)
else:
try:
- func = eval('self.do_' + cmd)
+ func = getattr(self, 'do_' + cmd)
except AttributeError:
return self.default(line)
return func(arg)
@@ -49,7 +49,7 @@ class Cmd:
if arg:
# XXX check arg syntax
try:
- func = eval('self.help_' + arg)
+ func = getattr(self, 'help_' + arg)
except:
print '*** No help on', `arg`
return