I've been trying to integrate jupyter as a testing playground to an existing python framework. The framework requires a set of python statements to execute in order to initialise and connect to database before actual testing can begin.
So, it there a way to pass a set of default execution statements whenever a new Notebook is spawned in browser?
- This has to be completely automatic.
- User doesn't need to know that there's this file that you need to load.
- It shouldn't clutter their user directory.
- Complete code should be displayed in the first cell, and executed whenever new browser window starts, or kernel is reloaded.
Is there a way to do this?
Edit: Found the proper solution.
ipython -i <path_to_python_file>
This could be integrated in the framework to be seamless and will not require user to manually maintain anything in their user directory.