-
-
Save paulgoetze/081fdb812d8d11907b73b9e577681f05 to your computer and use it in GitHub Desktop.
Elixir/Python – City search VII
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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