PYTHON_USER_MODULE

The PYTHON_USER_MODULE class is subclassed to provide easy access to specific Python modules. It is used extensively by the automatic code generation scripts and will probably not be used much by casual users of the library. This class cannet be instantiated directly.

deferred class interface PYTHON_USER_MODULE
feature(s) from PYTHON_USER_MODULE
   module_name: STRING
   make
      -- initialize using module_name
      require
         module_name /= Void
   from_import (new_module_name: STRING)
      -- imports the module--for user-defined modules, this must be 
      -- equal to the feature "module_name" or loading will not work
      require
         new_module_name.is_equal(module_name)
   function (function_name: STRING): PYTHON_OBJECT
      -- get the callable function of the given name
      require
         function_name /= Void;
         has_attr_string(function_name)
      ensure
         Result.is_callable
   call_function (function_name: STRING; function_args: PYTHON_TUPLE): PYTHON_OBJECT
      require
         function_name /= Void
invariant
   reference_count >= 0;
   valid_reference: not is_none implies is_module;
end of deferred PYTHON_USER_MODULE