Thanks Kevin. I hadn't tried require since I wanted the ability to chance 
the scripts and re-include them. However, it appears require/reload will 
accomplish the same thing (although I guess I will need to change all my 
requires to reloads if I want it done without exiting the repl). 

Cheers,
Ethan

On Monday, March 10, 2014 10:36:29 PM UTC-7, Kevin Squire wrote:
>
> If you use require("script.jl") instead of include, it will search the 
> LOAD_PATH.
>
> Cheers,
>    Kevin
>
>
> On Mon, Mar 10, 2014 at 9:49 PM, Ethan Anderes 
> <[email protected]<javascript:>
> > wrote:
>
>> Hi,
>>
>> Is there an addpath equivalent from Matlab? Basically, I have a directory 
>> that contains a bunch of scripts and modules. I've been using include to 
>> run the scripts but don't want to add the full path to each script. For 
>> example, dir is a directory which contains Mod.jl and script.jl. The last 
>> line in the following code gives an error:
>>
>>
>> push!(LOAD_PATH, pwd()*"/dir")
>> using Mod                 # this works
>> include("script.jl")      # this doesn't work
>>
>>  
>> Is there a way to tell the repl to search in dir when I 
>> include("script.jl")?
>>
>> Sorry if I missed this in the documentation...
>>
>
>

Reply via email to