durusmail: quixote-users: error in quixote.ptl.cimport
error in quixote.ptl.cimport
2005-10-24
2005-10-24
error in quixote.ptl.cimport
Titus Brown
2005-10-24
Hi folks,

I'm upgrading an old app from Quixote 1.x to Quixote 2.3, and I ran into
an interesting problem: even though 'quixote.html.html_quote' no longer
exists in Quixote 2.3, when using the 'cimport' PTL module you can
import it.

Try the following code:

---
import quixote.ptl.ptl_import

#quixote.ptl.ptl_import.cimport = None     # <-- disable cimport

quixote.ptl.ptl_import.install()

from quixote.html import html_quote
print 'html_quote:', html_quote
---

If you do not disable 'cimport', then 'html_quote' gets imported but set
to None.  If 'cimport' is disabled (by uncommenting the second line)
then the import fails properly.

cheers,
--titus
reply