List of use´d or import'ed modules in a Julia session

mocalvao
Mon, 13 Feb 2023 21:14:25 +0000
General Usage

Hi there

I would like to understand a little bit more about the answer to the question implied on the title of this topic of mine, as per the following question from StackOverflow: List of loaded/imported packages in Julia. The answer by Przemislaw Szufel seems the best one for me:

filter((x) -> typeof(eval(x)) <: Module && x ≠ :Main, names(Main,imported=true))

but I do not understand clearly the need for the eval function inside the typeof function in the conditional to the filter function. Could someone explain it from first principles? I have looked up the help for eval to no avail…

10 posts - 5 participants