-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for #58 - Adding support for loading startup files #59
base: master
Are you sure you want to change the base?
Conversation
"syscall" | ||
|
||
"github.com/golang/glog" | ||
zmq "github.com/pebbe/zmq4" | ||
) | ||
|
||
const jupyterStartupDirectoryPath = ".jupyter/startup/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you decide this path?
Do you have any reference?
I tried to find an official document about the start-up scripts in Jupyter notebook. But I can not find it. Instead, I found some documents mention .ipython/profile_default/startup
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had read somewhere that the ~/.ipython/profile_default/startup is getting deprecated in favour of ~/.jupyter/startup. However, I'm not able to find the link. Let me check.
@@ -137,6 +146,46 @@ func NewServer(connectionFile string, handlers RequestHandlers) (server *Server, | |||
}, nil | |||
} | |||
|
|||
func loadStartupScripts(execQueue *executeQueue, shell *shellSocket) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to keep gojupyterscaffold
package as a layer to implement Jupyter protocol (http://jupyter-client.readthedocs.io/en/stable/messaging.html) and independent from Go.
Please move your code to cmd/lgo-internal
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
Loading startup files from ~/.jupyter/startup folder in sorted order. Any go file present in the folder will be loaded. Files should not have a package statement at the beginning of the file though.