# Import already existing JL file in Pluto?

**URL:** <https://discourse.julialang.org/t/import-already-existing-jl-file-in-pluto/44484>\
**Category:** Pluto\
**Tags:** pluto, parsing\
**Created:** [August 7, 2020, 8:59am UTC](https://discourse.julialang.org/t/import-already-existing-jl-file-in-pluto/44484 "2020-08-07T08:59:41Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [February 18, 2021, 7:51am UTC](https://discourse.julialang.org/t/import-already-existing-jl-file-in-pluto/44484/21 "2021-02-18T07:51:02Z")

</div>

This should work if you manually re-execute the cell with the import statement.

If you want to automatically re-run the script, you could do the following:

a. for re-running when a variable changes in the notebook, but the include statement in a block with this variable, e.g.

```julia
begin
    x
    include("myscript.jl")
end

```

b. for re-running if the script itself changes, use Revise:

```julia
using Revise
includet("myscript.jl")

```

---

<div class="post-metadata">

**Author:** ![fonsp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fonsp/32/222349_2.png) [@fonsp](https://discourse.julialang.org/u/fonsp)\
**Post date:** [March 16, 2021, 11:07pm UTC](https://discourse.julialang.org/t/import-already-existing-jl-file-in-pluto/44484/22 "2021-03-16T23:07:25Z")

</div>

Use `ingredients` instead of `include` to load a file a second time into the same notebook session:

[https://github.com/fonsp/Pluto.jl/issues/115#issuecomment-661722426](https://github.com/fonsp/Pluto.jl/issues/115#issuecomment-661722426)

[Previous page](https://discourse.julialang.org/t/import-already-existing-jl-file-in-pluto/44484.md?page=1)
