def _AbsolutePath(filename, application_root, python_lib):
 (_, lib, suffix) = filename.partition('$PYTHON_LIB/')
 if lib:
  filename = os.path.join(python_lib, suffix)
 else:
  filename = os.path.join(application_root, filename)
 if (filename.endswith(os.sep) or os.path.isdir(filename)):
  filename = os.path.join(filename, '__init__.py')
 return filename

def _AbsolutePath ( filename , application_root , python_lib ) : ( _ , lib , suffix ) = filename . partition ( '$PYTHON_LIB/' ) if lib : filename = os . path . join ( python_lib , suffix ) else : filename = os . path . join ( application_root , filename ) if ( filename . endswith ( os . sep ) or os . path . isdir ( filename ) ) : filename = os . path . join ( filename , '__init__.py' ) return filename
returns the absolute path of a python script file .