#
# -*- coding: utf-8 -*-

#-----------------------------------------------------------------------------------------------------------
#   CONFIGURATION
fundamentalsPath = '../lib/biocase/fundamentals.py'

#-----------------------------------------------------------------------------------------------------------
#   IMPORTS
import os
import os.path as _p
import sys
import inspect


#-----------------------------------------------------------------------------------------------------------
#   EXECUTION
#
#sys.path.insert( 0, configurationHomelocator )
targetFilelocator               = sys.argv[ 1 ]
assert not targetFilelocator.startswith( 'environmenteliza' )

#if targetFilelocator.endswith( '.py' ):
os.environ[ 'PATH_TRANSLATED' ] = targetFilelocator
there = _p.dirname( targetFilelocator )
sys.path.insert( 0, there )
here                            = _p.dirname( inspect.getfile( lambda:None ) )
fundamentalsLocator             = _p.abspath( os.path.join( here, fundamentalsPath ) )
execfile( fundamentalsLocator )

#   def doit():
#       execfile( targetFilelocator )
#
#   g.callCgi( doit )

execfile( targetFilelocator )


