Mercurial > enso_core
view scripts/run_enso.py @ 60:09cc6fd3ddd2
Added a really basic plugin architecture. Also implemented a rc-file mechanism whereby the ~/.ensorc file is interpreted as a Python file and run before Enso starts. It's intended to make any changes it wants to the default enso.config--such as adding to config.PLUGINS--before Enso starts running.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Wed, 27 Feb 2008 11:35:04 -0800 |
parents | 16a9b0136822 |
children |
line wrap: on
line source
#! /usr/bin/env python import os import logging import enso if __name__ == "__main__": logging.basicConfig( level=logging.INFO ) homeDir = os.getenv( "HOME" ) if homeDir: ensorcPath = os.path.join( homeDir, ".ensorc" ) if os.path.exists( ensorcPath ): logging.info( "Loading '%s'." % ensorcPath ) contents = open( ensorcPath, "r" ).read() compiledContents = compile( contents, ensorcPath, "exec" ) exec compiledContents in {}, {} enso.run()