Merged revisions 85820,85823,85825,85840,85843-85845,85849-85851,85855,85867,85875,85907-85908,85911,85914 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
........
r85820 | georg.brandl | 2010-10-24 16:20:22 +0200 (So, 24 Okt 2010) | 1 line
Remove usage of exception indexing.
........
r85823 | georg.brandl | 2010-10-24 16:32:45 +0200 (So, 24 Okt 2010) | 1 line
Fix style.
........
r85825 | georg.brandl | 2010-10-24 17:16:02 +0200 (So, 24 Okt 2010) | 1 line
Add documentation about the default warnings filters.
........
r85840 | georg.brandl | 2010-10-25 19:50:20 +0200 (Mo, 25 Okt 2010) | 1 line
#3018: tkinter demo fixes for py3k.
........
r85843 | georg.brandl | 2010-10-26 08:59:23 +0200 (Di, 26 Okt 2010) | 1 line
Markup fix.
........
r85844 | georg.brandl | 2010-10-26 12:39:14 +0200 (Di, 26 Okt 2010) | 1 line
Work a bit more on tkinter demos.
........
r85845 | georg.brandl | 2010-10-26 12:42:16 +0200 (Di, 26 Okt 2010) | 1 line
faqwiz is removed.
........
r85849 | georg.brandl | 2010-10-26 21:31:06 +0200 (Di, 26 Okt 2010) | 1 line
#10200: typo.
........
r85850 | georg.brandl | 2010-10-26 21:58:11 +0200 (Di, 26 Okt 2010) | 1 line
#10200: typo.
........
r85851 | georg.brandl | 2010-10-26 22:12:37 +0200 (Di, 26 Okt 2010) | 1 line
Fix import.
........
r85855 | georg.brandl | 2010-10-27 09:21:54 +0200 (Mi, 27 Okt 2010) | 1 line
Encoding fix.
........
r85867 | georg.brandl | 2010-10-27 22:01:51 +0200 (Mi, 27 Okt 2010) | 1 line
Add David.
........
r85875 | georg.brandl | 2010-10-28 10:38:30 +0200 (Do, 28 Okt 2010) | 1 line
Fix bytes/str issues in get-remote-certificate.py.
........
r85907 | georg.brandl | 2010-10-29 06:54:13 +0200 (Fr, 29 Okt 2010) | 1 line
#10222: fix for overzealous AIX compiler.
........
r85908 | georg.brandl | 2010-10-29 07:22:17 +0200 (Fr, 29 Okt 2010) | 1 line
send_bytes obviously needs bytes...
........
r85911 | georg.brandl | 2010-10-29 07:36:28 +0200 (Fr, 29 Okt 2010) | 1 line
Fix markup error and update false positive entries from "make suspicious".
........
r85914 | georg.brandl | 2010-10-29 08:17:38 +0200 (Fr, 29 Okt 2010) | 1 line
(?:...) is a non-capturing, but still grouping construct.
........
diff --git a/Demo/tkinter/guido/tkman.py b/Demo/tkinter/guido/tkman.py
index 52b6d03..1baed88 100755
--- a/Demo/tkinter/guido/tkman.py
+++ b/Demo/tkinter/guido/tkman.py
@@ -2,15 +2,15 @@
# Tk man page browser -- currently only shows the Tcl/Tk man pages
-import sys
import os
-import string
import re
+import sys
from tkinter import *
-from ManPage import ManPage
-MANNDIRLIST = ['/depot/sundry/man/mann','/usr/local/man/mann']
-MAN3DIRLIST = ['/depot/sundry/man/man3','/usr/local/man/man3']
+from manpage import ManPage
+
+MANNDIRLIST = ['/usr/local/man/mann', '/usr/share/man/mann']
+MAN3DIRLIST = ['/usr/local/man/man3', '/usr/share/man/man3']
foundmanndir = 0
for dir in MANNDIRLIST:
@@ -197,7 +197,7 @@
def show_page(self, name):
file = '%s/%s.?' % (self.chaptervar.get(), name)
- fp = os.popen('nroff -man %s | ul -i' % file, 'r')
+ fp = os.popen('nroff -man -c %s | ul -i' % file, 'r')
self.text.kill()
self.title['text'] = name
self.text.parsefile(fp)
@@ -221,9 +221,9 @@
print('Regex error:', msg)
return
here = self.text.index(AtInsert())
- lineno = string.atoi(here[:string.find(here, '.')])
+ lineno = int(here[:here.find('.')])
end = self.text.index(AtEnd())
- endlineno = string.atoi(end[:string.find(end, '.')])
+ endlineno = int(end[:end.find('.')])
wraplineno = lineno
found = 0
while 1:
@@ -237,9 +237,9 @@
line = self.text.get('%d.0 linestart' % lineno,
'%d.0 lineend' % lineno)
i = prog.search(line)
- if i >= 0:
+ if i:
found = 1
- n = max(1, len(prog.group(0)))
+ n = max(1, len(i.group(0)))
try:
self.text.tag_remove('sel',
AtSelFirst(),
@@ -247,10 +247,10 @@
except TclError:
pass
self.text.tag_add('sel',
- '%d.%d' % (lineno, i),
- '%d.%d' % (lineno, i+n))
+ '%d.%d' % (lineno, i.start()),
+ '%d.%d' % (lineno, i.start()+n))
self.text.mark_set(AtInsert(),
- '%d.%d' % (lineno, i))
+ '%d.%d' % (lineno, i.start()))
self.text.yview_pickplace(AtInsert())
break
if not found: