Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamdagni86
Copy link

@jamdagni86 jamdagni86 commented May 8, 2018

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.

"syscall"

"github.com/golang/glog"
zmq "github.com/pebbe/zmq4"
)

const jupyterStartupDirectoryPath = ".jupyter/startup/"
Copy link
Owner

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.

Copy link
Author

@jamdagni86 jamdagni86 May 24, 2018

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) {
Copy link
Owner

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants