Tudor Gabriel wrote at 2007-7-18 12:26 +0300:
> ...
>now let's suppose all the files (all the py and zpt files) are in the
>same directory:Library
>in search_books_py i tried importing the book class in this ways:
>from book_py import *
>from Library.book_py import *
>from here.book_py import *
>from container.book_py import *

The "import *" is not very good style:

  You do not see where names come from -- this may drastically
  affect readability of your code

  A later "import *" may accidentally override names imported
  in a previous "import". I have seen cases where considerable
  analysis time was caused by such constructs.

If at all, you should have at most a single "import *" -- the first

Your names look funny. Why do they all end in "_py"?

Your Zope folders cannot be reached by the Python interpreter.
You cannot import from objects places in Zope's Web hiearachy.

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to