Skip to content

Instantly share code, notes, and snippets.

@paulgoetze
Created May 21, 2020 13:57
Show Gist options
  • Save paulgoetze/081fdb812d8d11907b73b9e577681f05 to your computer and use it in GitHub Desktop.
Save paulgoetze/081fdb812d8d11907b73b9e577681f05 to your computer and use it in GitHub Desktop.
Elixir/Python – City search VII
# lib/elixir_python.ex
defmodule ElixirPython do
use Export.Python
@python_dir "lib/python" # <-- this is the dir we created before
def python_call(file, function, args \\ []) do
{:ok, py} = Python.start(python_path: Path.expand(@python_dir))
Python.call(py, file, function, args)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment