For some reason I can’t get a basic example of this working:
File: testargs.jl
# example 1: minimal options/arguments, auto-generated help/version
using ArgParse
function main(args)
s = ArgParseSettings("Run deconvolution: " * # description
"flags, options help, " *
"required arguments.")
@add_arg_table! s begin
"--opt1"
help = "an option" # used by the help screen
"--opt2", "-o"
action = :store_true # this makes it a flag
help = "a flag"
"arg1"
help = "an argument"
required = true # makes the argument mandatory
end
parsed_args = parse_args(args, s)
println("Parsed args:")
for (key,val) in parsed_args
println(" $key => $(repr(val))")
end
using Distributed
addprocs(4)
@everywhere using StatsBase
end
main(ARGS)
Run:
$ julia testargs.jl
ERROR: LoadError: LoadError: UndefVarError: @everywhere not defined