I have a Python script that I run as part of an Elixir library that I am writing - that is, upon starting the application, I run System.cmd("python", [path/to/script], [])
in one of my start_link functions.
I install the script in the user's deps/mylibrary/lib folder.
The path/to/script
is the part that I don't know how to do - I can deduce where the script is located by evaluating System.cwd()
and looking at the result, but this seems wrong.
I figure there must be a way to do this using Mix.