WolframLang: Load a Package or File
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
- WolframScript Tutorial
- Wolfram Language File Name Extension
- WolframLang: Shell Tasks
- WolframLang: Navigate Directory
- WolframLang: List Files (Walk Directory)
- WolframLang: File Path Functions
- WolframLang: Delete Dir
- WolframLang: is File or Dir
- WolframLang: File Exist
- WolframLang: Get File Date
- WolframLang: Get File Size
- WolframLang: Print File Content
- WolframLang: Get File Hash
- WolframLang: Read File
- WolframLang: Write File
- WolframLang: Load a Package or File
- WolframLang: Get Environment Variable
- WolframLang: Date Time
- WolframLang: Find/Replace Script