# \#scripting

**URL:** https://discourse.julialang.org/tag/scripting/632.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Execute consecutive scripts](https://discourse.julialang.org/t/execute-consecutive-scripts/137064)

<div class="topic-metadata">

**Author:** [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)\
**Replies:** 7\
**Last updated:** [May 13, 2026, 6:44am UTC](https://discourse.julialang.org/t/execute-consecutive-scripts/137064 "2026-05-13T06:44:54Z")

</div>

Is there a simple way to execute either multiple scripts consecutively, or execute a script with some additional imports? Consider this use case: I have a NN training script, and if I import CUDA, it trains on the GPU. C…

---

## [Suppress printing methods in a piped script](https://discourse.julialang.org/t/suppress-printing-methods-in-a-piped-script/130698)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 7\
**Last updated:** [July 14, 2025, 2:36pm UTC](https://discourse.julialang.org/t/suppress-printing-methods-in-a-piped-script/130698 "2025-07-14T14:36:53Z")

</div>

I am writing a short script in Julia, which is piped in from an encompassing Bash script. I want to suppress printing of “f (generic function with 1 method)” outputs, as in $ cat \<\<EOF | julia \> foo() = 1 \> EOF foo (gen…

---

## [Feature request: --project=@script\_dir](https://discourse.julialang.org/t/feature-request-project-script-dir/124828)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 3\
**Last updated:** [January 16, 2025, 4:14pm UTC](https://discourse.julialang.org/t/feature-request-project-script-dir/124828 "2025-01-16T16:14:56Z")

</div>

I’d like to run a command like julia --project=@script\_dir long/path/to/my/package/src/script.jl rather than what I currently have to use, where the path is repeated verbatim julia --project=long/path/to/my/package lo…

---

## [Programming with rich text (Jupyter notebooks or similar?) on remote servers](https://discourse.julialang.org/t/programming-with-rich-text-jupyter-notebooks-or-similar-on-remote-servers/119249)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 20\
**Last updated:** [November 7, 2024, 1:03pm UTC](https://discourse.julialang.org/t/programming-with-rich-text-jupyter-notebooks-or-similar-on-remote-servers/119249 "2024-11-07T13:03:36Z")

</div>

Hello, I have been programming in Julia since 2020. I first used JupyterLab with IJulia.jl, and now I’m working with VSCode, still with IJulia.jl. In this last case, I actually don’t like programming using the Julia ex…

---

## [How to list names of functions in a script file using Pluto?](https://discourse.julialang.org/t/how-to-list-names-of-functions-in-a-script-file-using-pluto/117809)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 4\
**Last updated:** [August 7, 2024, 5:00am UTC](https://discourse.julialang.org/t/how-to-list-names-of-functions-in-a-script-file-using-pluto/117809 "2024-08-07T05:00:35Z")

</div>

Hi all, I have a file named functions.jl which I import into a Pluto notebook using include("scripts/functions.jl"). I want to list all the function names in the functions file, what is the best practice to do it? Th…

---

## [Can I set --optimize flag when calling script](https://discourse.julialang.org/t/can-i-set-optimize-flag-when-calling-script/102217)

<div class="topic-metadata">

**Author:** [@tomerarnon](https://discourse.julialang.org/u/tomerarnon)\
**Replies:** 3\
**Last updated:** [July 29, 2023, 1:43am UTC](https://discourse.julialang.org/t/can-i-set-optimize-flag-when-calling-script/102217 "2023-07-29T01:43:38Z")

</div>

If I call a script with ./script.jl (crucially, not julia script.jl) can I still set the -O flag somehow? Passing it in after the file name doesn’t seem to work.

---

## [Writing a zsh script to test a Julia project](https://discourse.julialang.org/t/writing-a-zsh-script-to-test-a-julia-project/96897)

<div class="topic-metadata">

**Author:** [@mmv](https://discourse.julialang.org/u/mmv)\
**Replies:** 2\
**Last updated:** [March 31, 2023, 11:50pm UTC](https://discourse.julialang.org/t/writing-a-zsh-script-to-test-a-julia-project/96897 "2023-03-31T23:50:48Z")

</div>

Hi! I’d like to write a zsh script to automate the testing of a Julia project by launching Julia starting the Pkg environment executing the following three commands: activate . add Test test \[project\_name\] exiting …

---

## [Why doesn't this "include-guard-ish" code evaluate in the correct order?](https://discourse.julialang.org/t/why-doesnt-this-include-guard-ish-code-evaluate-in-the-correct-order/93108)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 9\
**Last updated:** [January 19, 2023, 1:51pm UTC](https://discourse.julialang.org/t/why-doesnt-this-include-guard-ish-code-evaluate-in-the-correct-order/93108 "2023-01-19T13:51:17Z")

</div>

Hi all! So I was trying to implement a mechanism similar to a very simple C-like include guard: # file my\_script.jl if @isdefined my\_script\_provided print( "my\_script.jl already loaded") else # my code here …

---

## [How to programmatically update my PackageCompiler's sysimage, using a precompile\_execution\_file?](https://discourse.julialang.org/t/how-to-programmatically-update-my-packagecompilers-sysimage-using-a-precompile-execution-file/91050)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 1\
**Last updated:** [November 30, 2022, 8:55pm UTC](https://discourse.julialang.org/t/how-to-programmatically-update-my-packagecompilers-sysimage-using-a-precompile-execution-file/91050 "2022-11-30T20:55:58Z")

</div>

Hi all! I am using PackageCompiler to speed up Julia usage. It works enthusiastically well, and it saves me some time, but I also want to keep the sysimage updated. Specifically, I want to update it (even manually) once…

---

## [Best way to update parameter values in a temporary module](https://discourse.julialang.org/t/best-way-to-update-parameter-values-in-a-temporary-module/83971)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 4\
**Last updated:** [July 8, 2022, 9:37pm UTC](https://discourse.julialang.org/t/best-way-to-update-parameter-values-in-a-temporary-module/83971 "2022-07-08T21:37:08Z")

</div>

I am a Julia user mostly interested in numerical prototyping, where I have constant need to work with a large collection of custom functions that are related to each other, but far from being ready to define a package. I…

---

## [Communication with python and etc](https://discourse.julialang.org/t/communication-with-python-and-etc/74767)

<div class="topic-metadata">

**Author:** [@Machine-Teacher](https://discourse.julialang.org/u/Machine-Teacher)\
**Replies:** 16\
**Last updated:** [January 22, 2022, 3:10pm UTC](https://discourse.julialang.org/t/communication-with-python-and-etc/74767 "2022-01-22T15:10:54Z")

</div>

I have an interactive python script that writes to and asks for input from the terminal multiple times. Is there an easy way to interact with it? I tried to redirect input and output through Pipe and PipeBuffer but could…

---

## [Running a single Julia script simultaneously on different workers, each with different input parameters](https://discourse.julialang.org/t/running-a-single-julia-script-simultaneously-on-different-workers-each-with-different-input-parameters/65902)

<div class="topic-metadata">

**Author:** [@rachithaiyappa](https://discourse.julialang.org/u/rachithaiyappa)\
**Replies:** 0\
**Last updated:** [August 5, 2021, 6:01pm UTC](https://discourse.julialang.org/t/running-a-single-julia-script-simultaneously-on-different-workers-each-with-different-input-parameters/65902 "2021-08-05T18:01:30Z")

</div>

I’m trying to run a script main.jl simultaneously on multiple workers, each worker having a different input parameter for the script. The skeleton code looks something like this. This results in a could not open file err…

---

## [Failing to write a connection pool for Mongo](https://discourse.julialang.org/t/failing-to-write-a-connection-pool-for-mongo/57268)

<div class="topic-metadata">

**Author:** [@sampope](https://discourse.julialang.org/u/sampope)\
**Replies:** 3\
**Last updated:** [March 16, 2021, 5:52pm UTC](https://discourse.julialang.org/t/failing-to-write-a-connection-pool-for-mongo/57268 "2021-03-16T17:52:50Z")

</div>

tldr; how does one write a connection pool to a database like mongo? As a side project to learn more about julia, I have a script which pulls a list from a mongo collection (database table), hits a GEOIP API, and insert…

---

## [Re-writing a ruby side project into julia to learn](https://discourse.julialang.org/t/re-writing-a-ruby-side-project-into-julia-to-learn/57102)

<div class="topic-metadata">

**Author:** [@sampope](https://discourse.julialang.org/u/sampope)\
**Replies:** 1\
**Last updated:** [March 14, 2021, 1:36am UTC](https://discourse.julialang.org/t/re-writing-a-ruby-side-project-into-julia-to-learn/57102 "2021-03-14T01:36:52Z")

</div>

I have a few side projects which are running fine, but never let stability get in the way of learning a new language! I’ve been using julia for two weeks now and I figure an easy walk into learning more is to port the pr…

---

## [Implications of --compile=min and --optimize=0, for dummies](https://discourse.julialang.org/t/implications-of-compile-min-and-optimize-0-for-dummies/56894)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 22\
**Last updated:** [March 12, 2021, 4:40pm UTC](https://discourse.julialang.org/t/implications-of-compile-min-and-optimize-0-for-dummies/56894 "2021-03-12T16:40:42Z")

</div>

I’m starting to build some command line interfaces for some projects, and trying to figure out the best practices. In Fredrik Ekre’s juliacon talk, he recommends one option is to use --compile=min --optimize=0, but I’m t…
