[Python-checkins] python/dist/src/Demo/threads Coroutine.py, 1.1,
1.2 find.py, 1.7, 1.8 sync.py, 1.6, 1.7 telnet.py, 1.5, 1.6
doerwalter at users.sourceforge.net
doerwalter at users.sourceforge.net
Thu Feb 12 12:35:36 EST 2004
- Previous message: [Python-checkins] python/dist/src/Demo/sockets broadcast.py, 1.4,
1.5 ftp.py, 1.5, 1.6 gopher.py, 1.4, 1.5 mcast.py, 1.9,
1.10 radio.py, 1.3, 1.4 telnet.py, 1.5, 1.6 udpecho.py, 1.5,
1.6 unicast.py, 1.1, 1.2 unixclient.py, 1.1, 1.2
- Next message: [Python-checkins] python/dist/src/Demo/tix/samples DirList.py, 1.2,
1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Demo/threads
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21620/Demo/threads
Modified Files:
Coroutine.py find.py sync.py telnet.py
Log Message:
Replace backticks with repr() or "%r"
>From SF patch #852334.
Index: Coroutine.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/threads/Coroutine.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Coroutine.py 8 Nov 2000 15:17:49 -0000 1.1
--- Coroutine.py 12 Feb 2004 17:35:03 -0000 1.2
***************
*** 139,146 ****
def tran(self, target, data=None):
if not self.invokedby.has_key(target):
! raise TypeError, '.tran target ' + `target` + \
! ' is not an active coroutine'
if self.killed:
! raise TypeError, '.tran target ' + `target` + ' is killed'
self.value = data
me = self.active
--- 139,145 ----
def tran(self, target, data=None):
if not self.invokedby.has_key(target):
! raise TypeError, '.tran target %r is not an active coroutine' % (target,)
if self.killed:
! raise TypeError, '.tran target %r is killed' % (target,)
self.value = data
me = self.active
***************
*** 154,158 ****
raise Killed
if self.terminated_by is not None:
! raise EarlyExit, `self.terminated_by` + ' terminated early'
return self.value
--- 153,157 ----
raise Killed
if self.terminated_by is not None:
! raise EarlyExit, '%r terminated early' % (self.terminated_by,)
return self.value
Index: find.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/threads/find.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** find.py 18 Oct 2002 18:20:33 -0000 1.7
--- find.py 12 Feb 2004 17:35:03 -0000 1.8
***************
*** 117,121 ****
t2 = time.time()
! sys.stderr.write('Total time ' + `t2-t1` + ' sec.\n')
--- 117,121 ----
t2 = time.time()
! sys.stderr.write('Total time %r sec.\n' % (t2-t1))
***************
*** 134,138 ****
names = os.listdir(dir)
except os.error, msg:
! print `dir`, ':', msg
return
for name in names:
--- 134,138 ----
names = os.listdir(dir)
except os.error, msg:
! print repr(dir), ':', msg
return
for name in names:
***************
*** 142,146 ****
stat = os.lstat(fullname)
except os.error, msg:
! print `fullname`, ':', msg
continue
if pred(dir, name, fullname, stat):
--- 142,146 ----
stat = os.lstat(fullname)
except os.error, msg:
! print repr(fullname), ':', msg
continue
if pred(dir, name, fullname, stat):
Index: sync.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/threads/sync.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** sync.py 14 Sep 1998 16:44:07 -0000 1.6
--- sync.py 12 Feb 2004 17:35:03 -0000 1.7
***************
*** 337,341 ****
def broadcast(self, num = -1):
if num < -1:
! raise ValueError, '.broadcast called with num ' + `num`
if num == 0:
return
--- 337,341 ----
def broadcast(self, num = -1):
if num < -1:
! raise ValueError, '.broadcast called with num %r' % (num,)
if num == 0:
return
***************
*** 419,423 ****
if self.count == self.maxcount:
raise ValueError, '.v() tried to raise semaphore count above ' \
! 'initial value ' + `maxcount`
self.count = self.count + 1
self.nonzero.signal()
--- 419,423 ----
if self.count == self.maxcount:
raise ValueError, '.v() tried to raise semaphore count above ' \
! 'initial value %r' % (maxcount,))
self.count = self.count + 1
self.nonzero.signal()
Index: telnet.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/threads/telnet.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** telnet.py 21 Jan 2001 07:07:30 -0000 1.5
--- telnet.py 12 Feb 2004 17:35:03 -0000 1.6
***************
*** 58,62 ****
s.connect((host, port))
except error, msg:
! sys.stderr.write('connect failed: ' + `msg` + '\n')
sys.exit(1)
#
--- 58,62 ----
s.connect((host, port))
except error, msg:
! sys.stderr.write('connect failed: %r\n' % (msg,))
sys.exit(1)
#
***************
*** 78,82 ****
if opt:
print ord(c)
! ## print '(replying: ' + `opt+c` + ')'
s.send(opt + c)
opt = ''
--- 78,82 ----
if opt:
print ord(c)
! ## print '(replying: %r)' % (opt+c,)
s.send(opt + c)
opt = ''
***************
*** 102,106 ****
sys.stdout.write(cleandata)
sys.stdout.flush()
! ## print 'Out:', `cleandata`
def child(s):
--- 102,106 ----
sys.stdout.write(cleandata)
sys.stdout.flush()
! ## print 'Out:', repr(cleandata)
def child(s):
***************
*** 108,112 ****
while 1:
line = sys.stdin.readline()
! ## print 'Got:', `line`
if not line: break
s.send(line)
--- 108,112 ----
while 1:
line = sys.stdin.readline()
! ## print 'Got:', repr(line)
if not line: break
s.send(line)
- Previous message: [Python-checkins] python/dist/src/Demo/sockets broadcast.py, 1.4,
1.5 ftp.py, 1.5, 1.6 gopher.py, 1.4, 1.5 mcast.py, 1.9,
1.10 radio.py, 1.3, 1.4 telnet.py, 1.5, 1.6 udpecho.py, 1.5,
1.6 unicast.py, 1.1, 1.2 unixclient.py, 1.1, 1.2
- Next message: [Python-checkins] python/dist/src/Demo/tix/samples DirList.py, 1.2,
1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list