durusmail: quixote-users: enable_ptl and SQLObject
enable_ptl and SQLObject
enable_ptl and SQLObject
Egor Cheshkov
2004-10-27
Ksenia Marasanova wrote:
>
>> Hi!
>>
>> On Wed, Oct 27, 2004 at 01:03:27AM +0200, Ksenia Marasanova wrote:
>>
>>>>>> from quixote import enable_ptl
>>>>>> enable_ptl()
>>>>>> from sqlobject import *
>>>
>>> ImportError: cannot import name connectionForURI
>>
>>
>>    You are not the first who experienced this. The only workaround found
>> so far is to import SQLObject before calling enable_ptl().
>>
>
> :(
> enable_ptl() is called in the driver script, as usual (90% of the app
> use PTL for user interface). "from sql import *" is called from a
> regular py file somewhere in the library. I don't think I can change
> this order... or temporally disable ptl some how... can I?
>

Put "import sqlobject" to the very beginning  of the driver script. It
works for me. However is's just a workaround.

--
Egor

reply