from os.path import join
from xml.etree.cElementTree import parse
-import state
-from xtypes import *
+from xcbgen.xtypes import *
def import_(node, module, namespace):
'''
For imports, we load the file, create a new namespace object,
execute recursively, then record the import (for header files, etc.)
'''
+ # To avoid circular import error
+ from xcbgen import state
new_file = join(namespace.dir, '%s.xml' % node.text)
new_root = parse(new_file).getroot()
new_namespace = state.Namespace(new_file)
from os.path import dirname, basename
from xml.etree.cElementTree import parse
-import matcher
-from error import *
-from xtypes import *
+from xcbgen import matcher
+from xcbgen.error import *
+from xcbgen.xtypes import *
import __main__
'''
This module contains the classes which represent XCB data types.
'''
-from expr import Field, Expression
+from xcbgen.expr import Field, Expression
import __main__
class Type(object):