Package EasyExtend :: Module eeimporter
[hide private]
[frames] | no frames]

Module eeimporter

Classes [hide private]
  LangletHooks
  EEModuleLoader
  Importer
Functions [hide private]
 
import_from_langlet(langlet, fullname)
Function used to import a module of an arbitrary langlet.
Function Details [hide private]

import_from_langlet(langlet, fullname)

 

Function used to import a module of an arbitrary langlet.

Rationale:

   suppose you want to import a module ipconverter.gal from a Python program.
   This is easy when ipconverter.gal has been compiled already and you have the *.pyc
   file accordingly. However this may not be the case and you have to compile the
   *.gal file separately. This compilation is done on import but you can't import files
   with *.gal extensions from Python!

   The solution to this problem is to import ipconverter.gal from the gallery langlet:

       import EasyExtend.langlets.gallery as langlet
       import_from_langlet(langlet, "<module-path-to-ipconverter>.ipconverter")
Parameters:
  • langlet - langlet you want to import module from
  • fullname - a module path
Returns:
the compiled and imported module