Skip to content

Instantly share code, notes, and snippets.

@derks
Created June 6, 2011 16:12
Show Gist options
  • Save derks/1010556 to your computer and use it in GitHub Desktop.
Save derks/1010556 to your computer and use it in GitHub Desktop.
The simple hello world, though it doesn't output anything.
###
from cement2.core import foundation
app = foundation.lay_cement('helloworld')
app.run()
###
What the framework is doing:
###
(cement)derks-macbook [cement2] $ python test2.py --debug
2011-06-06 11:11:49,665 (DEBUG) cement2.core.foundation : laying cement for the 'helloworld' application
2011-06-06 11:11:49,665 (DEBUG) cement2.core.hook : defining hook 'cement_init_hook'
2011-06-06 11:11:49,665 (DEBUG) cement2.core.hook : defining hook 'cement_post_options_hook'
2011-06-06 11:11:49,665 (DEBUG) cement2.core.hook : defining hook 'cement_validate_config_hook'
2011-06-06 11:11:49,665 (DEBUG) cement2.core.hook : defining hook 'cement_pre_plugins_hook'
2011-06-06 11:11:49,666 (DEBUG) cement2.core.hook : defining hook 'cement_post_plugins_hook'
2011-06-06 11:11:49,666 (DEBUG) cement2.core.hook : defining hook 'cement_post_bootstrap_hook'
2011-06-06 11:11:49,666 (DEBUG) cement2.core.handler : defining handler type 'log' (ILogHandler)
2011-06-06 11:11:49,666 (DEBUG) cement2.core.handler : defining handler type 'config' (IConfigHandler)
2011-06-06 11:11:49,666 (DEBUG) cement2.core.handler : defining handler type 'extension' (IExtensionHandler)
2011-06-06 11:11:49,666 (DEBUG) cement2.core.handler : defining handler type 'plugin' (IPluginHandler)
2011-06-06 11:11:49,666 (DEBUG) cement2.core.handler : defining handler type 'output' (IOutputHandler)
2011-06-06 11:11:49,666 (DEBUG) cement2.core.handler : registering handler '<class 'cement2.core.extension.CementExtensionHandler'>' into handlers['extension']['cement']
2011-06-06 11:11:49,667 (DEBUG) cement2.core.handler : registering handler '<class 'cement2.core.plugin.CementPluginHandler'>' into handlers['plugin']['cement']
2011-06-06 11:11:49,667 (DEBUG) cement2.core.handler : registering handler '<class 'cement2.core.output.CementOutputHandler'>' into handlers['output']['cement']
2011-06-06 11:11:49,667 (DEBUG) cement2.core.foundation : now running the 'helloworld' application
2011-06-06 11:11:49,667 (DEBUG) cement2.core.foundation : setting up helloworld.extension handler
2011-06-06 11:11:49,667 (DEBUG) cement2.core.extension : loading the 'cement2.ext.ext_configparser' framework extension
2011-06-06 11:11:49,672 (DEBUG) cement2.core.handler : registering handler 'cement2.ext.ext_configparser.ConfigParserConfigHandler' into handlers['config']['configparser']
2011-06-06 11:11:49,672 (DEBUG) cement2.core.extension : loading the 'cement2.ext.ext_logging' framework extension
2011-06-06 11:11:49,673 (DEBUG) cement2.core.handler : registering handler '<class 'cement2.ext.ext_logging.LoggingLogHandler'>' into handlers['log']['logging']
2011-06-06 11:11:49,673 (DEBUG) cement2.core.foundation : setting up helloworld.config handler
2011-06-06 11:11:49,674 (DEBUG) cement2.core.foundation : validating required configuration parameters
2011-06-06 11:11:49,674 (DEBUG) cement2.core.foundation : setting up helloworld.log handler
2011-06-06 11:11:49,674 (DEBUG) helloworld : logging initialized for 'helloworld' using LoggingLogHandler
2011-06-06 11:11:49,674 (DEBUG) cement2.core.foundation : setting up helloworld.plugin handler
2011-06-06 11:11:49,675 (DEBUG) cement2.core.foundation : setting up helloworld.output handler
###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment