Did you try from gluon.dal import DAL On Thursday, April 21, 2011 10:17:47 AM UTC-4, Omri Har-Shemesh wrote:
> Hello, > > I'm writing a module to contain some class definitions I need for my > application's business logic and I would like to access gluon from my > module. > I placed my module inside the modules directory and import it using > local_import. I want to have the classes in the module access the database > (which I managed by passing the db DAL instance to the classe's > constructor), but I would like to be able to check that the expected DAL > object is transferred during construction of the object. To that end I would > like to write something like: > > if isinstance(db, gluon.dal.DAL) > > or just > > if isinstance(db,DAL). > > I have tried to import web2py in the usual way (import web2py) - and it > raised an exception - TclError: image "pyimage2" doesn't exist. > > and opened a white triangular window without any borders that will not go > away unless I close the web2py application. It does the same when I try to > import only web2py.gluon.dal. > > I'm running on Ubuntu 10.10 with web2py version 1.94.6. > > Thanks, > Omri > >