# How to call one julia program inside another julia program?

**URL:** <https://discourse.julialang.org/t/how-to-call-one-julia-program-inside-another-julia-program/36175>\
**Category:** General Usage\
**Created:** [March 19, 2020, 6:41am UTC](https://discourse.julialang.org/t/how-to-call-one-julia-program-inside-another-julia-program/36175 "2020-03-19T06:41:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eldho.Ashna](https://avatars.discourse-cdn.com/v4/letter/e/bc8723/32.png) [@Eldho.Ashna](https://discourse.julialang.org/u/Eldho.Ashna)\
**Post date:** [March 19, 2020, 6:41am UTC](https://discourse.julialang.org/t/how-to-call-one-julia-program-inside-another-julia-program/36175/1 "2020-03-19T06:41:40Z")

</div>

Suppose I have two programs: code.py and main.py. I want to call code.py in main.py. In python, we can call code.py inside main.py using the command `from main import *`. Similarly, in julia suppose I have two programs: main.jl and code.jl. How can I call code.jl inside main.jl?

---

<div class="post-metadata">

**Author:** ![Iulian.Cioarca](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iulian.cioarca/32/30166_2.png) [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Post date:** [March 19, 2020, 7:11am UTC](https://discourse.julialang.org/t/how-to-call-one-julia-program-inside-another-julia-program/36175/2 "2020-03-19T07:11:28Z")

</div>

You need to `include("code".jl")` in your main.jl. Then you can call whatever function you defined in code.jl( or use variables, etc)  
If code.jl contains a module you also need to `using .Mymodule` (notice the dot).  
You will find extensive info about modules in:  
[https://docs.julialang.org/en/v1/manual/modules/#modules-1](https://docs.julialang.org/en/v1/manual/modules/#modules-1)
