Newbie namespace question

deelan ggg at
Wed Dec 22 17:22:51 CET 2004

bcarlso at wrote:
> Run it and get a name error, which, makes sense.
> If I try to use the standard import solution as deelan suggests I have
> a circular reference on the imports and I get an error that it can't
> import class DataSource (presumbably because it hasn't gotten far
> enough through to realize that there's a DataSource class
> defined.
oh, i see. so the scenario is more complex.

> Any insight would be greatly appreciated, and thanks to both deelan and
> Steve for your help.

i believe that to avoid circular refs errors remember you can 
lazy-import,  for example here i'm importing the email package:

>>> m = __import__('email')
>>> m
<module 'email' from 'C:\Python\lib\email\__init__.pyc'>

check help(__import__) for futher details.


@prefix foaf: <> .
<#me> a foaf:Person ; foaf:nick "deelan" ;
foaf:weblog <> .

More information about the Python-list mailing list