Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a 'bootstrap' importer to CementApp #126
It is common to do something like:
from cement.core import foundation app = foundation.CementApp('myapp') try: import myapp.bootstrap.base app.setup() app.run() finally: app.close()
It testing it gets annoying to have to import that bootstrap, which the CementApp() likely requires to function. Having a bootstrap mechanizm built in would be good:
app = foundation.CementApp('myapp', bootstrap='myapp.bootstrap.base') ...
The alternative is that you could also subclass CementApp.setup() to do the bootstrap... but there is less control over where/how a user would implement that.