Skip to content

include_string (etc.) should have an argument to specify the module to evaluate in #4259

@stevengj

Description

@stevengj

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions