WolframLang: Load a Package or File

By Xah Lee. Date: . Last updated: .

there are two major ways to load a package.

Load Any File of WolframLang Code

to load any file that is WolframLang code, you can use

Get[fullpath]

Get[ "c:/Users/xah/Desktop/Xah_WolframLang_packages/PlaneCurvePlot/PlaneCurvePlot.wl" ]

Load File in Current Notebook Dir

(* load a file, where the file is in the same dir as the current notebook *)

Get[StringJoin[NotebookDirectory[], "PlaneCurvePlot.wl"]]

Load a Package by Context Name

another way to load a package, is to call

Needs[ "ContextName`" ]

This requires that the package file is located in one of the designated directory. The directory is listed in the variable $UserBaseDirectory. On Microsoft Windows, it's typically at "~/AppData/Roaming/Mathematica"

Needs[ "PlaneCurvePlot`" ]

WolframLang, Package, Load File

WolframLang, Shell Tasks