[Checkins] SVN: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/ Thanks
Adam for this incredible work!
Roger Ineichen
roger at projekt01.ch
Sat Oct 28 10:03:13 EDT 2006
Log message for revision 70942:
Thanks Adam for this incredible work!
I did some changes, please can you
double check this since I'm using a
windows box;-)
Changed:
A z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/INSTALL.txt
A z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/README.txt
U z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/main.py
U z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/plugin_tree.py
U z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/registry.py
A z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/
A z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/README.txt
A z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/runzodbbrowser.bat
A z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/runzodbbrowser.py
-=-
Added: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/INSTALL.txt
===================================================================
--- z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/INSTALL.txt 2006-10-28 13:26:18 UTC (rev 70941)
+++ z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/INSTALL.txt 2006-10-28 14:03:12 UTC (rev 70942)
@@ -0,0 +1,38 @@
+=======
+INSTALL
+=======
+
+Just a quick overview, feel free to enhance this documentation or corret my
+typos! Additional to a working Zope3 project, you need the following software:
+
+- wxPython
+
+- Wax
+
+
+Resources
+---------
+
+You can find this resources at the follwoing locations.
+
+
+xwPython
+~~~~~~~~
+
+http://www.wxpython.org/download.php
+
+
+Wax
+~~~
+
+http://sourceforge.net/projects/waxgui
+
+
+Notes
+-----
+
+Right now the wxPython version 2.6 is used. Teh newer version doesn't work on
+my windows box, because there is a mess in the wxPython library. I guess they
+changed import wxPython to import wx and right now not all subpackages are
+ported to this naming. Adam, should we switch to wxPythn version 2.7 or does
+the Wax package not support this version right now?
Property changes on: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/INSTALL.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/README.txt
===================================================================
--- z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/README.txt 2006-10-28 13:26:18 UTC (rev 70941)
+++ z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/README.txt 2006-10-28 14:03:12 UTC (rev 70942)
@@ -0,0 +1,11 @@
+======
+README
+======
+
+The ZODB Browser is a wx python client application which can visualize the
+ZODB internals. After starting the ZODB Browser, you can open a Data.fs and
+traverse the database objects in a tree view.
+
+A big thank you goes to Adam Groszer, which started this great work at the
+Swiss Easter Sprint. Feel free to ask on the zope3-dev at zope.org mailinglist
+if you have question.
Property changes on: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/main.py
===================================================================
--- z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/main.py 2006-10-28 13:26:18 UTC (rev 70941)
+++ z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/main.py 2006-10-28 14:03:12 UTC (rev 70942)
@@ -15,7 +15,9 @@
from z3c.zodbbrowser import __title__
from z3c.zodbbrowser.utils import *
-from z3c.zodbbrowser.registry import getSourcePlugins, getDBDisplayPlugins, installplugins
+from z3c.zodbbrowser.registry import getSourcePlugins
+from z3c.zodbbrowser.registry import getDBDisplayPlugins
+from z3c.zodbbrowser.registry import installplugins
from z3c.zodbbrowser.treehandler import rootHandler, baseHandler
class ZODBFrame(MDIParentFrame):
@@ -44,7 +46,8 @@
curry(self.menuOpen, klass),
"This the text in the statusbar")
- #menu1.Append("&Open\tCTRL+O", self.menuOpen, "This the text in the statusbar")
+ menu1.Append("&Open\tCTRL+O", self.menuOpen,
+ "This the text in the statusbar")
menu1.Append("&Close", self.menuClose)
menu1.AppendSeparator()
menu1.Append("E&xit\tALT+X", self.menuExit, "Exit")
@@ -58,7 +61,7 @@
#self.SetSize((800, 600))
#self.CenterOnScreen()
- def menuOpen(self, openerklass, event):
+ def menuOpen(self, openerklass, event=None):
opener = openerklass(self)
if opener.open(self):
viewopts = opener.getSupportedDisplays()
@@ -68,7 +71,8 @@
klassindex = None
if len(frameklasses) == 0:
ShowMessage(__title__,
- "Happens that there is no display plugin for %s" % viewopts)
+ "Happens that there is no display plugin for %s" % \
+ viewopts)
elif len(frameklasses) == 1:
klassindex = 0
else:
Modified: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/plugin_tree.py
===================================================================
--- z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/plugin_tree.py 2006-10-28 13:26:18 UTC (rev 70941)
+++ z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/plugin_tree.py 2006-10-28 14:03:12 UTC (rev 70942)
@@ -7,7 +7,7 @@
from z3c.zodbbrowser.bases import BaseDisplayPlugin
twist_buttons=1
-from treehandler import rootHandler, baseHandler
+from z3c.zodbbrowser.treehandler import rootHandler, baseHandler
class TreeDisplay(BaseDisplayPlugin):
"""
Modified: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/registry.py
===================================================================
--- z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/registry.py 2006-10-28 13:26:18 UTC (rev 70941)
+++ z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/registry.py 2006-10-28 14:03:12 UTC (rev 70942)
@@ -28,8 +28,8 @@
PluginRegistry['db_display']={}
#object display plugin registry
-#these plugins are checked when the user right-clicks in the tree? on any object
-#plugins matching by type will be displayed in a shortcut menu
+#these plugins are checked when the user right-clicks in the tree? on any
+#object plugins matching by type will be displayed in a shortcut menu
#format is: [("object type", pluginClass)]
#object type can be "*", then the plugin applies for all types
#with the "*" a kind of 'open new window from here...' could be implemented
@@ -114,8 +114,8 @@
in the folder of our source
these should register/can register any plugin
through the passed PluginRegistry parameter"""
-
- here = os.path.abspath(os.path.dirname(sys.argv[0]))
+ here = os.path.dirname(os.path.abspath(__file__))
+ #here = os.path.abspath(os.path.dirname(sys.argv[0]))
plugins = glob.glob(os.path.join(here, "plugin*.py"))
for plg in plugins:
Added: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/README.txt
===================================================================
--- z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/README.txt 2006-10-28 13:26:18 UTC (rev 70941)
+++ z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/README.txt 2006-10-28 14:03:12 UTC (rev 70942)
@@ -0,0 +1,30 @@
+======
+README
+======
+
+Start scripts
+-------------
+
+We provide some start scripts which can be used for a special subversion trunk
+setup. This setup looks like:
+
+<ProjectRoot>
+ - Zope3
+ - src
+ - zope
+ - app
+ - src
+ - z3c
+ - zodbbrowser
+ - z3c
+ - xy
+ - myproject
+ -packages
+
+The scripts runzodbbrowser.py and runzodbbrowser.bat in this folder can be used in
+the <ProjectRoot> as a startscript for the ZODB Browser. Put this scripts
+into the root if you use a similar setup. The script will automaticly asjust
+the import path if you start the ZODB Browser.
+
+Note: this script is only tested on my windows box, feel free to correct it
+if it's not working on your *nix box.
Property changes on: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/runzodbbrowser.bat
===================================================================
--- z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/runzodbbrowser.bat 2006-10-28 13:26:18 UTC (rev 70941)
+++ z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/runzodbbrowser.bat 2006-10-28 14:03:12 UTC (rev 70942)
@@ -0,0 +1,6 @@
+ at echo off
+set PYTHON=C:\Python24\python.exe
+set PYTHONPATH=.;.\src;.\Zope3;.\Zope3\src
+set INSTANCE_HOME=.\src
+set SOFTWARE_HOME=.\Zope3\src
+"%PYTHON%" "runzodbbrowser.py"
Added: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/runzodbbrowser.py
===================================================================
--- z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/runzodbbrowser.py 2006-10-28 13:26:18 UTC (rev 70941)
+++ z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/runzodbbrowser.py 2006-10-28 14:03:12 UTC (rev 70942)
@@ -0,0 +1,48 @@
+##############################################################################
+#
+# Copyright (c) 2005 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+"""Script to run the ZODB Browser.
+
+$Id$
+"""
+
+import os
+import sys
+
+here = os.path.dirname(os.path.abspath(__file__))
+ZOPE3 = os.path.join(here, "Zope3")
+SOFTWARE_HOME = os.path.join(here, "src")
+INSTANCE_HOME = os.path.join(here, "Zope3", "src")
+
+
+def run():
+
+ # add additional path
+ basepath = filter(None, sys.path)
+ sys.path[:] = [INSTANCE_HOME, SOFTWARE_HOME] + basepath
+
+ # remove bad and duplicated paths from sys.path
+ goodPath = []
+ badPath = [ZOPE3, here]
+ for path in sys.path:
+ if path not in badPath:
+ goodPath.append(path)
+
+ sys.path[:] = goodPath
+
+ from z3c.zodbbrowser.main import main
+ main()
+
+
+if __name__ == '__main__':
+ run()
Property changes on: z3c.zodbbrowser/sandbox/src/z3c/zodbbrowser/scripts/runzodbbrowser.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
More information about the Checkins
mailing list