Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 79c85f1

Browse files
committed
* 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
1 parent 6930b3d commit 79c85f1

4 files changed

Lines changed: 27 additions & 1 deletion

File tree

Lib/ftplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def retrbinary(self, cmd, callback, blocksize):
283283
# The callback function is called for each line, with trailing
284284
# CRLF stripped. This creates a new port for you.
285285
# print_lines is the default callback
286-
def retrlines(self, cmd, args):
286+
def retrlines(self, cmd, *args):
287287
callback = None
288288
if args:
289289
callback = args[0]

Lib/lib-stdwin/wdbframewin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def re_eval(self):
9494
output = ''
9595
else:
9696
globals = self.frame.f_globals
97+
globals['__privileged__'] = 1
9798
locals = self.dict
9899
try:
99100
value = eval(expr, globals, locals)

Lib/stdwin/wdbframewin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def re_eval(self):
9494
output = ''
9595
else:
9696
globals = self.frame.f_globals
97+
globals['__privileged__'] = 1
9798
locals = self.dict
9899
try:
99100
value = eval(expr, globals, locals)

Lib/test/test_md5.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Testing md5 module
2+
3+
import string
4+
from md5 import md5
5+
6+
def hexstr(s):
7+
h = string.hexdigits
8+
r = ''
9+
for c in s:
10+
i = ord(c)
11+
r = r + h[(i >> 4) & 0xF] + h[i & 0xF]
12+
return r
13+
14+
def md5test(s):
15+
return 'MD5 ("' + s + '") = ' + hexstr(md5(s).digest())
16+
17+
print 'MD5 test suite:'
18+
print md5test('')
19+
print md5test('a')
20+
print md5test('abc')
21+
print md5test('message digest')
22+
print md5test('abcdefghijklmnopqrstuvwxyz')
23+
print md5test('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')
24+
print md5test('12345678901234567890123456789012345678901234567890123456789012345678901234567890')

0 commit comments

Comments
 (0)