Similar to eval, the include_string function (and other include functions) should have a way to specify what module the string is evaluated in. Maybe just an optional third argument?
I noticed this today because a student wanted to use include(....) to load a file, but instead of looking in the current directory it was looking in ~/.julia/IJulia/src: apparently since include_string is being called from a function in the IJulia module then it is evaluated in that module rather than in Main as I intended.
cc: @JeffBezanson
Similar to
eval, theinclude_stringfunction (and otherincludefunctions) should have a way to specify what module the string is evaluated in. Maybe just an optional third argument?I noticed this today because a student wanted to use
include(....)to load a file, but instead of looking in the current directory it was looking in~/.julia/IJulia/src: apparently sinceinclude_stringis being called from a function in theIJuliamodule then it is evaluated in that module rather than inMainas I intended.cc: @JeffBezanson