Newer
Older
Import / projects / Gameloft / bne_lib / tools / bgl / example.py
@John John on 29 Dec 2020 717 bytes bulk import from macbookpro checkouts
#!python
"""
  Example of how to use the BGL module.

"""
import sys
from os.path import abspath, dirname, join

# you need to hard code the path to bgl here!!
# or add it to your PYTHONPATH environment variable.
bgl_path = abspath(join(abspath(dirname(__file__)), ".."))
sys.path.append(bgl_path)
#sys.path.append(".)

# then all the other imports relative to bgl should work.
# some examples
from bgl.jinja2 import Environment, PackageLoader
from bgl import rk
import bgl.rki


# if these are not None it worked..
assert Environment is not None, "Jinja import failed :("
assert rk is not None, "RK import failed :("
assert bgl.rki is not None, "RKI import failed :("


print bgl.BGL_DIR