ceiversion module

Parent Previous Next

ceiversion module

The ceiversion module is technically part of the enve package.  It should be available in any Python interpreter that includes the enve module.  The purpose of this module is to make it possible for a Python application to have knowledge, outside of EnSight, of the specific CEI distribution that the interpreter is part of.  It is available from within EnSight and the cpythonXX standalone interpreter.  Note: you must import enve before you can import ceiversion.  The module consists of a number of string constants.  There are no methods in the module.


    ensight    Same as ensight_suffix.

    ensight_full    The full version number of EnSight: '2021 R2'

    ensight_suffix    The folder suffix for ensight: '212'

    apex    The name of the apex folder:  'apex212'

    apex_suffix    The suffix of the apex folder: '212'

Example: Get the name of the cpython startup script (note: enve is imported before ceiversion)

import enve

import ceiversion

import os, os.path

home = os.environ.get('CEI_HOME','')

cpython = os.path.join(home, 'bin', 'cpython' + ceiversion.apex_suffix)

if enve.arch().startswith('win'):

    cpython += '.bat'