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

set isinteractive via the command line #230

Merged
merged 3 commits into from
Sep 16, 2014

Conversation

jkroso
Copy link
Contributor

@jkroso jkroso commented Sep 15, 2014

Otherwise it looks like ~/.juliarc.jl will always be loaded too early

Otherwise it looks like ~/.juliarc.jl will always be loaded too early
@stevengj
Copy link
Member

Note that this only works in Julia 0.3, and currently IJulia is backwards compatible with 0.2.

It would be best to just add the -i for Julia 0.3 or later.

@jkroso
Copy link
Contributor Author

jkroso commented Sep 15, 2014

I haven't tested it in julia@0.2 but I think it should work now

@@ -70,7 +70,7 @@ else
binary_name = "julia-basic"
end
add_config("ipython_config.py", "KernelManager.kernel_cmd",
"""["$(escape_string(joinpath(JULIA_HOME,(@windows? (VERSION >= v"0.3-"?"julia.exe":"julia.bat"):"$binary_name"))))", "-F", "$(escape_string(joinpath(Pkg.dir("IJulia"),"src","kernel.jl")))", "{connection_file}"]""",
"""["$(escape_string(joinpath(JULIA_HOME,(@windows? (VERSION >= v"0.3-"?"julia.exe":"julia.bat"):"$binary_name"))))", $(VERSION < v"0.3" ? " " : "-i"), "-F", "$(escape_string(joinpath(Pkg.dir("IJulia"),"src","kernel.jl")))", "{connection_file}"]""",
Copy link
Member

Choose a reason for hiding this comment

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

Passing " " as an option is not equivalent to passing no option at all: Julia will treat it as if you asked it to open a file named " ", and will fail.

(One simple test is to change your version test to VERSION >= v"0.5" to see what happens when you pass " " to Julia 0.3.)

@jkroso
Copy link
Contributor Author

jkroso commented Sep 16, 2014

Sorry about that I actually thought I'd at least done that test. Take another look

stevengj added a commit that referenced this pull request Sep 16, 2014
set isinteractive via the command line
@stevengj stevengj merged commit fd66b30 into JuliaLang:master Sep 16, 2014
@stevengj
Copy link
Member

Looks good, thanks!

@jkroso jkroso deleted the fix/isinteractive branch September 16, 2014 20:15
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.

None yet

2 participants