1
Description: Fix syntax errors in example files.
2
Bug-Debian: http://bugs.debian.org/580271
3
Author: Arthur de Jong <adejong@debian.org>
5
--- a/examples/chess.py
6
+++ b/examples/chess.py
8
self.term.process_list (self.before)
9
self.term.process_list (self.after)
10
self.last_computer_move = ''
11
- def read_until_cursor (self, r,c)
12
+ def read_until_cursor (self, r,c):
14
self.child.read(1, 60)
17
read_until_cursor (19,60)
18
#self.child.expect ('\[19;60H')
19
self.child.sendline (move)
20
- print 'do_move' move
21
+ print 'do_move', move
24
def get_first_computer_move (self):
25
--- a/examples/fix_cvs_files.py
26
+++ b/examples/fix_cvs_files.py
29
def is_binary (filename):
31
- """Assume that any file with a character where the 8th bit is set is
33
+ """Assume that any file with a character where the 8th bit is set is
36
fin = open(filename, 'rb')
37
wholething = fin.read()
40
def is_kb_sticky (filename):
42
- """This checks if 'cvs status' reports '-kb' for Sticky options. If the
43
- Sticky Option status is '-ks' then this returns 1. If the status is
44
- 'Unknown' then it returns 1. Otherwise 0 is returned. """
45
+ """This checks if 'cvs status' reports '-kb' for Sticky options. If the
46
+ Sticky Option status is '-ks' then this returns 1. If the status is
47
+ 'Unknown' then it returns 1. Otherwise 0 is returned. """
50
s = pexpect.spawn ('cvs status %s' % filename)
53
def cvs_admin_kb (filename):
55
- """This uses 'cvs admin' to set the '-kb' sticky option. """
56
+ """This uses 'cvs admin' to set the '-kb' sticky option. """
58
s = pexpect.run ('cvs admin -kb %s' % filename)
59
# There is a timing issue. If I run 'cvs admin' too quickly
62
def walk_and_clean_cvs_binaries (arg, dirname, names):
64
- """This contains the logic for processing files. This is the os.path.walk
65
- callback. This skips dirnames that end in CVS. """
66
+ """This contains the logic for processing files. This is the os.path.walk
67
+ callback. This skips dirnames that end in CVS. """
69
if len(dirname)>3 and dirname[-3:]=='CVS':
71
--- a/examples/ssh_tunnel.py
72
+++ b/examples/ssh_tunnel.py
74
print 'restarting tunnel'