36 |
# Put this down here. No need to import if were just printing usage |
# Put this down here. No need to import if were just printing usage |
37 |
from circus import * |
from circus import * |
38 |
|
|
39 |
|
# Do some config setup first |
40 |
config = config.Config() |
config = config.Config() |
|
# XXX: these have been moved to Config module |
|
41 |
config.circus_home = os.environ['CIRCUS_HOME'] |
config.circus_home = os.environ['CIRCUS_HOME'] |
42 |
# TODO: add support for multiple paths |
# TODO: add support for multiple paths |
43 |
config.set_module_path(os.environ['CIRCUS_MODULES']) |
config.set_module_path(os.environ['CIRCUS_MODULES']) |
44 |
|
|
|
# FIXME: okay, were calling Ringmaster() before we set CIRCUS_HOME....isnt |
|
|
# there something wrong with this logic? Wont the directory this file is in |
|
|
# always be CIRCUS_HOME? What if CIRCUS_HOME points somewhere else? How |
|
|
# would that change things? .... |
|
45 |
master = circus.Ringmaster(config) |
master = circus.Ringmaster(config) |
46 |
|
|
47 |
# Load modules listed in config |
# Load modules listed in config |
48 |
master.import_modules() |
master.import_modules() |
49 |
|
|
50 |
master.load_module("Keybindings") |
#master.load_module("Keybindings") |
51 |
master.load_module("Example") |
#master.load_module("Example") |
52 |
master.unload_module("Example") |
#master.unload_module("Example") |
53 |
master.config.dump_config() |
#master.config.dump_config() |
54 |
# Enter the main loop |
# Enter the main loop |
55 |
master.loop() |
master.loop() |
56 |
|
|