-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Andreas Jung wrote:
| --On Dienstag, 19. April 2005 11:25 Uhr +0200 Lucas Hofman | <[EMAIL PROTECTED]> wrote: | |> I have an external method a.py (in $INSTANCE_HOME/Extensions) that |> becomes to big to be in one python file. |> |> I have put some functions in b.py (also in |> $INSTANCE_HOME/Extensions) and want to use them from a.py. However |> 'import b' in a.py does not work. | | *Why* isn't it working? Errors? Tracebacks?
The file from which an ExternalMethod is instantiated is neither a script nor a module, which means that Python's import rules don't work for it.
In response to the original question: I would put the 'b.py' file somewhere on the PYTHONPATH ($INSTANCE_HOME/lib/python would be a good choice); 'import b' will then work as expected.
Tres. - -- =============================================================== Tres Seaver [EMAIL PROTECTED] Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCZQ2aGqWXf00rNCgRAtD/AKCC8E0O0mMEEF2eW0AGXf1aofWopgCfZIHr xvjVCTq8SS2IxRntZv77BbM= =0f3g -----END PGP SIGNATURE-----
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )