0

I've been absolutely loving the Hy REPL. However it would speed up my workflow immensely if I could have a set of default imports at startup. Clojure has a way of configuring startup imports via leiningen config. Currently I load the repl this way:

path/bin/hy --repl-output-fn=hy.contrib.hy-repr.hy-repr

Similarly is there a way I can reset all imported modules from the REPL namespace without having to restart the REPL ?

dedupe
  • 9
  • 2

1 Answers1

1

Proper initialization scripts are not yet implemented. In the meantime, you can do things like

hy -i '(import math re pandas)'

or

hy -i '(import [my-init-package [*]])'

to run some code of your choice before starting the REPL.

Kodiologist
  • 2,984
  • 18
  • 33