When looking at files like this: https://github.com/simon-lc/Silico.jl/blob/main/examples/demo/peg_in_hole_planning.jl
The author does not call "using Silico" or "using Mehrotra" anywhere, yet calls it many times throughout the file. As someone coming from Python, I don't understand this. How does Julia know where to look for Silico without a statement like "using Silico"?
For this, you can customize the configuration file of Julia.
For example, in Windows OS, you can go to the following path:
C://Users//.julia/config/startup.jl
Open the file and write the importing command(s) you want. E.g., using Term or using OhMyREPL and using Statistics: mean, std (then those functions will be available by default). Then every time you run the Julia, those packages will be imported automatically.
*Note that if this file doesn't exist in the path, you can create a file with the same name.
You can also compile the preferred packages into the Julia system image, and the Julia REPL will start a bit quicker since it does not have to parse and compile the package when loaded. The way to do this is by using PackageCompiler.jl. [1]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With