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

kernelspec's argv does not run when concat'ed #137

Closed
willwhitney opened this issue May 20, 2015 · 3 comments
Closed

kernelspec's argv does not run when concat'ed #137

willwhitney opened this issue May 20, 2015 · 3 comments

Comments

@willwhitney
Copy link
Contributor

Replacing the {connection_file} with the one I intend to use, my argv looks like this:

R -e IRkernel::main() --args /Users/will/code/hydrogen/kernel-configs/kernel-faf2d916-7227-4a10-8fb1-d102c2074374.json

Running this gives: ERROR: option '-e' requires a non-empty argument; the argv stitched together should be a correct command. I think it actually just needs quotes around IRkernel::main().

@takluyver
Copy link
Member

If you concat them, it's up to you to handle any quoting that's necessary. On POSIX platforms, subprocesses are actually started with a list of arguments. When you use them like that, they work correctly.

@willwhitney
Copy link
Contributor Author

Oh wow, good call — I can use Node's spawn with the list of arguments.

@takluyver
Copy link
Member

Excellent, that should be better. You might want to double check what it does on Windows, where processes are started with a string, but it should be able to do the right thing. In Python, the subprocess module deals with the quoting to convert the list to a string on Windows: https://docs.python.org/3/library/subprocess.html#converting-an-argument-sequence-to-a-string-on-windows

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

No branches or pull requests

2 participants