[Zope3-checkins] CVS: Zope3/utilities - XXXreport2html.py:1.4 makezcmldocs.py:1.5 makezcmldocs.zcml:1.4 unittestgui.py:1.13
Jim Fulton
jim@zope.com
Wed, 25 Dec 2002 09:15:37 -0500
Update of /cvs-repository/Zope3/utilities
In directory cvs.zope.org:/tmp/cvs-serv20790/utilities
Modified Files:
XXXreport2html.py makezcmldocs.py makezcmldocs.zcml
unittestgui.py
Log Message:
Grand renaming:
- Renamed most files (especially python modules) to lower case.
- Moved views and interfaces into separate hierarchies within each
project, where each top-level directory under the zope package
is a separate project.
- Moved everything to src from lib/python.
lib/python will eventually go away. I need access to the cvs
repository to make this happen, however.
There are probably some bits that are broken. All tests pass
and zope runs, but I haven't tried everything. There are a number
of cleanups I'll work on tomorrow.
=== Zope3/utilities/XXXreport2html.py 1.3 => 1.4 ===
--- Zope3/utilities/XXXreport2html.py:1.3 Mon Dec 9 15:42:07 2002
+++ Zope3/utilities/XXXreport2html.py Wed Dec 25 09:15:36 2002
@@ -41,7 +41,7 @@
if x == "--\n":
print ".",
comments.append(current)
- current = ["", 0, []]
+ current = ["", 0, []]
currentfile = None
continue
=== Zope3/utilities/makezcmldocs.py 1.4 => 1.5 ===
--- Zope3/utilities/makezcmldocs.py:1.4 Fri Nov 8 15:09:43 2002
+++ Zope3/utilities/makezcmldocs.py Wed Dec 25 09:15:36 2002
@@ -3,14 +3,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""
@@ -37,14 +37,14 @@
here = os.path.normpath(os.path.join(os.getcwd(),
os.path.split(sys.argv[0])[0]))
root = os.path.split(here)[0] #We live in the utilities subdirectory
-libpython = os.path.join(root, 'lib', 'python')
+libpython = os.path.join(root, 'src')
sys.path=[libpython] + basepath
# Now for the z3 imports.
-from Zope.Configuration.meta import _directives
-from Zope.Configuration.xmlconfig import XMLConfig
-from Zope.App import config
-from Zope.Configuration.metametaConfigureForDocgen import _metadataKey
+from zope.configuration.meta import _directives
+from zope.configuration.xmlconfig import XMLConfig
+from zope.app import config
+from zope.configuration.metametaconfigurefordocgen import _metadataKey
# Some additional useful names.
treeroot = os.path.join(root,'doc','zcml.new') #Where we put the docs.
@@ -110,7 +110,7 @@
'(optional) ' or '')
outfile.write(paragraph("%s -- %s%s" % (attr,required,
description))+'\n\n')
- if (level<9 and len(registry)>1 or len(registry)==1 and not
+ if (level<9 and len(registry)>1 or len(registry)==1 and not
registry.keys()==[_metadataKey]):
outfile.write(' '*level+'Subdirectives\n\n')
for subdir in registry:
@@ -139,4 +139,3 @@
if __name__ == '__main__':
run()
-
=== Zope3/utilities/makezcmldocs.zcml 1.3 => 1.4 ===
--- Zope3/utilities/makezcmldocs.zcml:1.3 Thu Nov 21 21:10:41 2002
+++ Zope3/utilities/makezcmldocs.zcml Wed Dec 25 09:15:36 2002
@@ -1,7 +1,7 @@
<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
-<include package="Zope.Configuration" file="metameta.zcml" />
-<include package="Zope.Configuration" file="metametaForDocgen.zcml" />
-<include package="Zope" />
+<include package="zope.configuration" file="metameta.zcml" />
+<include package="zope.configuration" file="metametafordocgen.zcml" />
+<include package="zope.app" />
</zopeConfigure>
=== Zope3/utilities/unittestgui.py 1.12 => 1.13 ===
--- Zope3/utilities/unittestgui.py:1.12 Fri Oct 18 05:11:35 2002
+++ Zope3/utilities/unittestgui.py Wed Dec 25 09:15:36 2002
@@ -3,14 +3,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""
GUI framework and application for use with Python unit testing framework.
@@ -188,7 +188,7 @@
"""
def __init__(self):
self.previousModules = sys.modules.copy()
-
+
def rollbackImports(self):
for modname in sys.modules.keys():
if not self.previousModules.has_key(modname):
@@ -254,7 +254,7 @@
def createWidgets(self):
"""Creates and packs the various widgets.
-
+
Why is it that GUI code always ends up looking a mess, despite all the
best intentions to keep it tidy? Answers on a postcard, please.
"""
@@ -264,7 +264,7 @@
self.top = tk.Frame()
add((self.top, {'fill': tk.BOTH, 'expand': 1}, 0))
-
+
# Status bar
statusFrame = tk.Frame(self.top, relief=tk.SUNKEN, borderwidth=2)
add((statusFrame,
@@ -291,10 +291,10 @@
add((tk.Label(progressFrame, text="Progress:"), {'anchor': tk.W}, 1))
tb = self.toggleButton = tk.Button(progressFrame, padx=0,
- relief=tk.GROOVE,
+ relief=tk.GROOVE,
textvariable=self.toggleVar,
command=self.toggleMinimal)
-
+
add((self.toggleButton, {'side': tk.LEFT, 'anchor': tk.NW}, 0))
pb = self.progressBar = ProgressBar(progressFrame, relief=tk.SUNKEN,
borderwidth=2)
@@ -322,7 +322,7 @@
('Errors:', self.errorCountVar),
('Remaining:', self.remainingCountVar)):
add((tk.Label(progressFrame, text=label), {'side': tk.LEFT}, 1))
-
+
add((tk.Label(progressFrame, textvariable=var, foreground="blue"),
{'side': tk.LEFT, 'fill': tk.X, 'expand': 1, 'anchor': tk.W},
1))
@@ -344,7 +344,7 @@
self.errorListbox.configure(yscrollcommand=listScroll.set)
# List box showing warnings
-
+
add((tk.Label(leftFrame, text="Warnings:"), {'anchor': tk.W}, 1))
warnFrame = tk.Frame(leftFrame, relief=tk.SUNKEN, borderwidth=2)
add((warnFrame, {'fill': tk.BOTH, 'anchor': tk.NW, 'expand': 1}, 1))
@@ -442,7 +442,7 @@
def notifyWarning(self, msg, tb_str):
self.warningListbox.insert(tk.END, "Warning: %s" % msg)
self.warnInfo.append((msg,tb_str))
-
+
def notifyTestFailed(self, test, err):
self.failCountVar.set(1 + self.failCountVar.get())
self.errorListbox.insert(tk.END, "Failure: %s" % test)
@@ -560,13 +560,13 @@
text.tag_add(tagname,
"%d.%d" % (i + 1, start), "%d.%d" % (i + 1, end))
text.tag_bind(tagname, "<Enter>",
- lambda e, n=tagname:
+ lambda e, n=tagname:
e.widget.tag_config(n, underline=1))
text.tag_bind(tagname, "<Leave>",
- lambda e, n=tagname:
+ lambda e, n=tagname:
e.widget.tag_config(n, underline=0))
text.tag_bind(tagname, "<Button-1>",
- lambda e, self=self, f=file, l=line:
+ lambda e, self=self, f=file, l=line:
self.launchEditor(f, l))
def launchEditor(self, file, line):
@@ -601,22 +601,22 @@
"Bindings should be propagated to the contained canvas."
tk.Frame.bind(self, sequence, callback, add)
self.canvas.bind(sequence, callback, add)
-
+
def unbind(self, sequence):
"Bindings should be propagated to the contained canvas."
tk.Frame.unbind(self, sequence)
self.canvas.unbind(sequence)
-
+
def bind_class(self, className, sequence=None, callback=None, add=None):
"Bindings should be propagated to the contained canvas."
tk.Frame.bind_class(self, className, sequence, callback, add)
self.canvas.bind_class(className, sequence, callback, add)
-
+
def unbind_class(self, className, sequence):
"Bindings should be propagated to the contained canvas."
tk.Frame.bind_class(self, className, sequence)
self.canvas.bind_class(className, sequence)
-
+
def paint(self, *args):
totalWidth = self.canvas.winfo_width()
width = int(self.fraction * float(totalWidth))