On 4/30/07, Eddie Corns <[EMAIL PROTECTED]> wrote:
$ python
>>> from quixote import enable_ptl
>>> enable_ptl()
>>> import munepy
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named munepy
>>>

versus
$ python
>>> import munepy
>>>

You can make a utility script like this:

====
from quixote import enable_ptl
enable_ptl()
import first_ptl_module
import second_ptl_module
# Continue with all .ptl modules
====

If you run this every time you modify the .ptl's, it will update all
the .pyc's, and then you can avoid using enable_ptl() at all in your
application.

Import hooks are fragile in Python, and often break when combined with
import hooks from other packages.  That's why they must be enabled in
a certain order; e.g., PTL after ZODB.  I can't remember which other
packages have import hooks.  Cheetah has an optional one though I've
never used it.

--
Mike Orr <[EMAIL PROTECTED]>
_______________________________________________
Quixote-users mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users

Reply via email to