clj-python/libpython-clj

Make polyglot development easier by allow require-python to be path-informed

jjtolton opened this issue · 1 comments

I find myself writing code like this way too often:

(import-python)
(require-python 'os)

(let [cur-dir (os/getcwd)]
  (try
    (os/chdir "some/dir")
    (require-python 'path.i.need)
    (finally
      (os/chdir cur-dir))))

I feel like it would be much nicer if I could do:

(require-python :from "some/dir"
                'path.i.need
                :from "a/nother/dir"
                'other.data
                :from "yet/another"
                '[last-one :path "slightly/more/convoluted"])

This would make exploratory development much less of a chore when writing new Python files.

Closed by #254