appis passed to the
_setup()method … because that is called when the plugin is instantiated during
app.setup(). You should set
self.app = appin
_setup().. or if you subclass from
cement.core.handler.CementHandlerjust make sure you
_setup()and it does that
app.setup()you can access
self.appanywhere in the plugin class
bossto create a
cement-plugin? You need to configure
plugin_dirin a configuration file in order to find plugins..
.pyo) but that is easily reverse-engineerable and or doesn’t completely hide your code if I recall correctly
pyconcrete is an experimental project, there is always a way to decrypt .pye files, but pyconcrete just make it harder.
/etc/yourapp/yourapp.conf, etc… then modifying the config should take affect
app.config.parse_file('%s/config/facetracker.conf' % os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))before
app.run()and it worked... I'd like default values in the project that can be superseded by the values in system and user configurations.
load()function is called durint
app.setup()… so, you shouldn’t expect things to be ready to use in
app.reload()which could be called after if
-cwas passed. I would start by trying to add a
pre_runhook that looks for
-cand if passed, do
app.config.parse_file()(that file), then
app.reload()… but there are plenty of logistical issues that might arrise.