summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-12-14 15:54:01 (GMT)
committerGuido van Rossum <guido@python.org>1993-12-14 15:54:01 (GMT)
commit79c85f1778c31ebdae09d2e2802e15e7d4f237b9 (patch)
tree93c7c6f1fe76c63b9400b4ee55d4d8bedb79bfb8 /Lib
parent6930b3d18da1ce43d5a0c8099df66b8c59490465 (diff)
downloadcpython-79c85f1778c31ebdae09d2e2802e15e7d4f237b9.zip
cpython-79c85f1778c31ebdae09d2e2802e15e7d4f237b9.tar.gz
cpython-79c85f1778c31ebdae09d2e2802e15e7d4f237b9.tar.bz2
* wdbframewin.py (re_eval): set __privileged__ in globals so private
variables can still be seen by the debugger * ftplib.py (retrlines): args should be *args. * ChangeLog: entries for Sjoerd's addition sunau.py and changes to aiff.py * test_md5.py: test program for built-in md5 module
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ftplib.py2
-rw-r--r--Lib/lib-stdwin/wdbframewin.py1
-rwxr-xr-xLib/stdwin/wdbframewin.py1
-rw-r--r--Lib/test/test_md5.py24
4 files changed, 27 insertions, 1 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 22852bc..bfb0b5b 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -283,7 +283,7 @@ class FTP:
# The callback function is called for each line, with trailing
# CRLF stripped. This creates a new port for you.
# print_lines is the default callback
- def retrlines(self, cmd, args):
+ def retrlines(self, cmd, *args):
callback = None
if args:
callback = args[0]
diff --git a/Lib/lib-stdwin/wdbframewin.py b/Lib/lib-stdwin/wdbframewin.py
index db3d137..f8b84e3 100644
--- a/Lib/lib-stdwin/wdbframewin.py
+++ b/Lib/lib-stdwin/wdbframewin.py
@@ -94,6 +94,7 @@ class FrameWindow(basewin.BaseWindow):
output = ''
else:
globals = self.frame.f_globals
+ globals['__privileged__'] = 1
locals = self.dict
try:
value = eval(expr, globals, locals)
diff --git a/Lib/stdwin/wdbframewin.py b/Lib/stdwin/wdbframewin.py
index db3d137..f8b84e3 100755
--- a/Lib/stdwin/wdbframewin.py
+++ b/Lib/stdwin/wdbframewin.py
@@ -94,6 +94,7 @@ class FrameWindow(basewin.BaseWindow):
output = ''
else:
globals = self.frame.f_globals
+ globals['__privileged__'] = 1
locals = self.dict
try:
value = eval(expr, globals, locals)
diff --git a/Lib/test/test_md5.py b/Lib/test/test_md5.py
new file mode 100644
index 0000000..43f12ca
--- /dev/null
+++ b/Lib/test/test_md5.py
@@ -0,0 +1,24 @@
+# Testing md5 module
+
+import string
+from md5 import md5
+
+def hexstr(s):
+ h = string.hexdigits
+ r = ''
+ for c in s:
+ i = ord(c)
+ r = r + h[(i >> 4) & 0xF] + h[i & 0xF]
+ return r
+
+def md5test(s):
+ return 'MD5 ("' + s + '") = ' + hexstr(md5(s).digest())
+
+print 'MD5 test suite:'
+print md5test('')
+print md5test('a')
+print md5test('abc')
+print md5test('message digest')
+print md5test('abcdefghijklmnopqrstuvwxyz')
+print md5test('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')
+print md5test('12345678901234567890123456789012345678901234567890123456789012345678901234567890')