# Export and run in console

**URL:** https://discourse.julialang.org/t/export-and-run-in-console/5027
**Category:** New to Julia
**Tags:** question
**Created:** [July 23, 2017, 3:51am UTC](https://discourse.julialang.org/t/export-and-run-in-console/5027 "2017-07-23T03:51:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wilsontov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wilsontov/32/1461_2.png) [@wilsontov](https://discourse.julialang.org/u/wilsontov)
#### Post date: [July 23, 2017, 3:51am UTC](https://discourse.julialang.org/t/export-and-run-in-console/5027/1 "2017-07-23T03:51:00Z")

</div>

I hope that you are well. I have a question, how might i export a series of functions and at the same time be able to use them from console?

Ex:

i have this:

```julia
using PyCall, FileIO
@pyimport SimpleCV

function backg(path::String, save_path::String)
  ...
end

# __name__ == " __main__"
if length(ARGS) == 2
  backg(ARGS[1], ARGS[2])
end

```

What might i do to be able to export this function and at the same time use her in the console with the given arguments? Thank you!

---

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [July 23, 2017, 5:10am UTC](https://discourse.julialang.org/t/export-and-run-in-console/5027/2 "2017-07-23T05:10:45Z")

</div>

I think this might be what you’re looking for: ["Import guard" in julia - #4 by tkelman](https://discourse.julialang.org/t/import-guard-in-julia/1505/4)
