On 7/24/06, <b class="gmail_sendername">Philipp von Weitershausen</b> <<a href="mailto:philipp@weitershausen.de">philipp@weitershausen.de</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Note that in newer Zopes we have a debug shell which saves you a lot of<br>typing. Simply execute "bin/zopectl debug" from your instance (you don't<br>even have to put $INSTANCE/lib/python on your PYTHONPATH), the effect is
<br>the same as the Debugger stanza you see in my book. zopectl debug wasn't<br>around when I wrote the first edition, unfortunately.</blockquote><div><br>Does this mean that a second edition is in the works? <br></div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">>> Given that I am writing my code somewhere different than my zope instance,<br>>> how to I extend the default
site.zcml to include my stuff?<br>><br>> I'm sure that the debugger does much more, but after a few minutes thinking<br>> about how to add things it seemed relatively obvious - just not explicitly<br>> described anywhere.
<br>><br>> For the benefit of others:<br>> - put your development directory in your PYTHONPATH<br>> - add a <include package="xxx"/> in the site.zcml for your package.<br><br>Indeed that's what you have to do (instead of editing
site.zcml you can<br>also put a worldcookery-configure.zcml slug into etc/package-includes).<br>This is, btw, described in Chapter 2 as a necessary step for making the<br>examples work anyway (especially the interactive interpreter sessions).
</blockquote><div><br>Sorry, missed the bit in chapter 2 about this, or had just forgotten by the time I needed to do it.<br><br>Is adding the slug to the etc/package-includes the preferred way of extending then? <br></div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">>> In chapter 5 (Content Components), the Recipe object ends up using<br>>> FieldProperty to initialise members based on the interfaces schema, however
<br>>> in chapter 6 (Persistency) these are dropped and empty unicode strings and<br>>> PersistentLists used instead. Does this mean that you loose the schema<br>>> checks on assignment now? Confused :???:
<br><br>Yes, you lose schema checks on assignment. Usually you don't care about<br>them, though. Automated add and edit forms will perform those checks on<br>the user input anyways, having them on the Python level is (almost) useless.
<br><br>Philipp</blockquote><div><br>OK, thanks. It is excellent to have the author answer the questions :)<br><br>Tim<br> </div><br></div>