在python中从.hy文件中调用函数并在.py文件中导入具有函数定义的.hy文件

My .py file looks like:

import hy
import example
foo2()

My .hy file looks like:

(defn foo2 [] (+ 1 1))

.hy file is in same folder as .py file.

If I run .py file I am getting error:

runfile('D:/del/hy2/untitled46.py', wdir='D:/del/hy2')
Reloaded modules: example
Traceback (most recent call last):

  File "<ipython-input-274-3982ada2f243>", line 1, in <module>
    runfile('D:/del/hy2/untitled46.py', wdir='D:/del/hy2')

  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
    execfile(filename, namespace)

  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "D:/del/hy2/untitled46.py", line 3, in <module>
    foo2()

NameError: name 'foo2' is not defined

Question: How to correct my code above if I want to call function defined in .hy file from .py file with Python?

顺便说一下,这很好。

In .py file:

import hy
import example

In .hy file:

(print "Hello, World")