Re[2]: [Zope3-Users] Debugger for Zope 3
Hi, If we are coming to commercial IDEs then Komodo is also a good choice for debugging. You just have to put it's dbgp module on the PYTHONPATH and use the below small script to avoid some irritating deprecation mesages. After this, you put brk() in you code and it will stop there. After it was stopped for the first with brk() the debugger will obey all 'normal' breakpoints. I think it supports threading also but never tried it. import zope.deprecation from dbgp.client import brk as dbgpbrk def brk(): zope.deprecation.__show__.off() dbgpbrk() Wednesday, April 26, 2006, 9:58:52 AM, you wrote: On Tuesday 25 April 2006 08:27, Achim Domma wrote: I would like to start Zope 3 with the debugger, set some breakpoints in my modules and step through the code to learn more about Zope. WingIDE's debugger is superb. Once you set the thread count to 1 it should work. At some point we'll have to write a small package that installs the debugger hook automatically. For now duplicating the Zope 2 steps and the Zope 2 product is the way to go. Regards, Stephan -- Best regards, Adammailto:[EMAIL PROTECTED] -- Quote of the day: Oh, Aunty Em, it's so good to be home! ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Debugger for Zope 3
On 4/26/06, Stephan Richter [EMAIL PROTECTED] wrote: WingIDE's debugger is superb. Once you set the thread count to 1 it should work. At some point we'll have to write a small package that installs the debugger hook automatically. For now duplicating the Zope 2 steps and the Zope 2 product is the way to go. You don't happen to have that code somewhere? I could probably mold it into a product, and would really like it. Figuring out what the WingDBG product really does is gonna take me way to much time. :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] newbie question on i18n
Hi everybody, I'm developing a multilanguage site in Zope 3. I've just prepared it to support the i18n based on the browser language. I would like also to let the user decide which language to use. (e.g. using a combo box present on each page of the site) Anybody has an example where I could learn from? Thank You, Ricki ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] debian installation
I figured it out. An admin installed a different version and overrode Debian. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Johnson Sent: Wednesday, April 26, 2006 10:21 AM To: 'Stéphane Brault'; 'user-list zope' Subject: RE: [Zope3-Users] debian installation This conversation must have jinxed me, because now I cannot install python2.4-dev. Does anyone know a good apt source for the python2.4-dev package? Ours depends upon python2.4 (=2.4.1-2), while the current version of python is 2.4.2, and so we cannot install. Our apt list is: deb http://ftp.us.debian.org/debian/ stable main contrib non-free deb http://non-us.debian.org/debian-non-US/ stable/non-US main contrib non-free deb http://debian.yorku.ca/debian/ stable main contrib non-free deb-src http://mirrors.usc.edu/pub/linux/distributions/debian/ stable main deb http://security.debian.org/ stable/updates main contrib non-free -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stéphane Brault Sent: Tuesday, April 25, 2006 7:01 AM To: user-list zope Subject: Re : [Zope3-Users] debian installation Thanks Andrius, it now works. Stéphane - Message d'origine De : Andrius Armonas [EMAIL PROTECTED] À : Stéphane Brault [EMAIL PROTECTED] Cc : user-list zope zope3-users@zope.org Envoyé le : Lundi, 24 Avril 2006, 10h55mn 23s Objet : Re: [Zope3-Users] debian installation Hi, you have to install python2.4-dev package. -- Andrius Stéphane Brault wrote: Hi, I'm trying to install zope on a debian distribution. ./configure works ok, then when I invoke make I get : /usr/bin/python2.4 install.py -q build error: invalid Python installation: unable to open /usr/lib/python2.4/config/Makefile (No such file or directory) make: *** [build] Error 1 I then create a config directory and copy Makefile in it. I relaunch make and get: /usr/bin/python2.4 install.py -q build Traceback (most recent call last): File install.py, line 29, in ? context.setup() File /home/Zope-3.2.0/Support/zpkgsetup/setup.py, line 132, in setup setup(**kwargs) File /usr/lib/python2.4/distutils/core.py, line 149, in setup dist.run_commands() File /usr/lib/python2.4/distutils/dist.py, line 946, in run_commands self.run_command(cmd) File /usr/lib/python2.4/distutils/dist.py, line 966, in run_command cmd_obj.run() File /usr/lib/python2.4/distutils/command/build.py, line 112, in run self.run_command(cmd_name) File /usr/lib/python2.4/distutils/cmd.py, line 333, in run_command self.distribution.run_command(command) File /usr/lib/python2.4/distutils/dist.py, line 966, in run_command cmd_obj.run() File /home/Zope-3.2.0/Support/zpkgsetup/build_ext.py, line 24, in run distutils.command.build_ext.build_ext.run(self) File /usr/lib/python2.4/distutils/command/build_ext.py, line 254, in run customize_compiler(self.compiler) File /usr/lib/python2.4/distutils/sysconfig.py, line 161, in customize_compiler cpp = cc + -E # not always TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' make: *** [build] Error 1 Any hint ? Thanks, Stéphane ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Oracle Adapter
Ive not seen any posts or information on this recently. Does anyone if there is an Oracle database adapter available? -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Container base classes
hi there I am new to Zope. I have been spending the last several days reading everything I can find on Zope. So far a lot of the larger examples I've seen use zope.app.container.btree.BTreeContainer any time it is necessary to hold a bunch of other objects. Yet when I looked at the documentation for BTreeContainer it says that I probably shouldn't be using it and should be doing something else. Assuming I know enough now to start working on a real project, should I be sticking with the stuff in the persistent package? Are there other persistent objects hiding somewhere else in the API I should be aware of? thanks -jachin ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] announce: pure ORM for Zope3
Hello! In new branch zsqlmap-project i develop light plugable ORM for Zope3(only!). It's NOT wrapper for sqlobject, but i use sqlobject naming style. Supported: StringCol and other; ForeignKey MulitpleJoin; AND\OR \BETWEEN\...\LIKE-sql conditions for select\selectBy; Now exist two orm-adapters: for gadfly and postgres, but it's easy develop new orm-adapters and new column-types without 'monkey patching'. Doc-test: https://code.keysolutions.ru/trac/zsqlmap/browser/branches/orm/README.txt ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] newbie question on i18n
Hi, On Wed, Apr 26, 2006 at 11:14:19AM +0200, Riccardo Tonon wrote: Hi everybody, I'm developing a multilanguage site in Zope 3. I've just prepared it to support the i18n based on the browser language. I would like also to let the user decide which language to use. (e.g. using a combo box present on each page of the site) Anybody has an example where I could learn from? I'm developing a multilingual site, too. It works like this: * browser language preferences are usually used to determine favorite language * users can click on one of 3 small flags to override browser preferences with a different language * all data fields on content objects are stored as dictionaries like this: context.sampledata={'de':'Einige Daten','en':'Some Data'} * Data fields are inserted into pagetemplates using a special metal-namespace div tal:content=context/sampledate/mpgi18n:text / * The displayed language version is negotiated which means that the original browser language preference list is really treated as a list. I attached the necessary BrowserLanguage-adapter, zcml (look for the zope:adapter-statement) and the BrowserView which is used to define the override language. Disadvantage of my solution: * It's using (session)cookies hth. Frank ?xml version=1.0 encoding=iso-8859-1? configure xmlns=http://namespaces.zope.org/browser; xmlns:zope=http://namespaces.zope.org/zope; xmlns:i18n=http://namespaces.zope.org/i18n; i18n_domain=mpgsite !-- I18N Widget -- zope:view type=zope.publisher.interfaces.browser.IBrowserRequest provides=zope.app.form.interfaces.IInputWidget for=mpgsite.i18n.interfaces.II18N factory=mpgsite.i18n.browser.widgets.SimpleI18NInputWidget permission=zope.Public / zope:view type=zope.publisher.interfaces.browser.IBrowserRequest provides=zope.app.form.interfaces.IDisplayWidget for=mpgsite.i18n.interfaces.II18N factory=mpgsite.i18n.browser.widgets.I18NDisplayWidget permission=zope.Public / zope:view type=zope.publisher.interfaces.browser.IBrowserRequest provides=zope.app.form.interfaces.IDisplayWidget for=mpgsite.i18n.interfaces.II18N zope.schema.interfaces.ITextLine factory=mpgsite.i18n.browser.widgets.I18NTextDisplayWidget permission=zope.Public / zope:view type=zope.publisher.interfaces.browser.IBrowserRequest provides=zope.app.form.interfaces.IDisplayWidget for=mpgsite.i18n.interfaces.II18N zope.schema.interfaces.IBytesLine factory=mpgsite.i18n.browser.widgets.I18NTextDisplayWidget permission=zope.Public / zope:view type=zope.publisher.interfaces.browser.IBrowserRequest provides=zope.app.form.interfaces.IDisplayWidget for=mpgsite.i18n.interfaces.II18N zope.schema.interfaces.ISourceText factory=mpgsite.i18n.browser.widgets.I18NTextDisplayWidget permission=zope.Public / zope:view type=zope.publisher.interfaces.browser.IBrowserRequest provides=zope.app.form.interfaces.IDisplayWidget for=mpgsite.i18n.interfaces.II18N zope.schema.interfaces.IField factory=mpgsite.i18n.browser.widgets.I18NSimpleDisplayWidget permission=zope.Public / addform name=add_I18NConfig.html schema=mpgsite.i18n.interfaces.II18NConfig content_factory=mpgsite.i18n.app.I18NConfig permission=zope.ManageContent label=Add I18N-configuration utility widget field=i18nsortorder class=zope.app.form.browser.BytesWidget required=False convert_missing_value=False / /addform addMenuItem class=mpgsite.i18n.app.I18NConfig title=I18N Config description=A configuration utility for I18N content permission=zope.ManageContent view=add_I18NConfig.html / editform schema=mpgsite.i18n.interfaces.II18NConfig name=edit.html permission=zope.ManageContent i18n:domain=zope menu=zmi_views title=Edit label=Edit / defaultView
[Zope3-Users] Re: development workflow
Jachin Rupe wrote: hi there I'm new to Zope development from the PHP realm. When I worked in PHP I would, write a little code, save it, refresh the browser and see what happened. Initially I tried to do that in Zope and as you can imagine I decided very quickly that having to restart Zope after I made every change and then waiting for it to restart was just not going to work. (bunny trail: I've got a 1.67 ghz G4 PowerBook with 1 gig of Ram, is root Startup time: 32.328 sec real, 16.860 sec CPU about where I should be or am I doing something terribly wrong if it's taking me that long to start zope?) Nope. I've got a 1.33 G4, so I need about the same amount of time. Of course, you *can* speed up the start up a little bit by disabling all the stuff you don't need. ZCML execution isn't exactly fast, so any package you don't need and can live without, even if it's only for the moment, saves you startup time. After some reading it sounds like the way to go with Zope is to just write lots of those tests, which run much much quicker. So my development processes looks something like this: 1. write code 2. write tests 3. run tests 4 debug 5. repeat steps 1-4 until there's a whole bunch of new features and I can't stand not trying them out. 6. restart zope and try things out. Is that how Zope 3 development is supposed to work? This is definitely a good way of reducing the amount of restarts one has to make. Typically, I write at least the basic unit tests for components before I think about their ZCML registration or even starting up Zope. Often, I also write science fiction tests, meaning, I first write a test that illustrates how I'd like the component to behave, and then I implement the component until the tests pass. Either way, writing the basic unit tests definitely will catch stupid errors immediately, such as import errors, typos, etc. Right now I'm concerned about what will happen when I start testing the security and the design (skin). My guess is there are mechanisms to write tests to try out the the security settings Of course there are. We call those functional tests and usually write them using a test browser (see zope.testbrowser). For more info on functional tests (though not on the test browser as it's more recent technology), I can refer you to my book, http://worldcookery.com. but if I makes design changes I obviously can't look at those via the command line. ZPT pages reload without having to restart Zope, which is a big win during the layouting phase. Philipp ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Oracle Adapter
Hi. there is an Oracle database adapter available? Yes, here http://svn.zope.org/cxoracleda/trunk/ -- Yusei Tahara ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users