hylang/hy — pull request #368 by lmatthieu (2013-12-09 21:31:37+00:00)
Title: Hy as a Python syntax  extension

Hi,

A test, inspired by Pyxl of using hy as a syntax extension.
It uses Python support for specifying source code encodings (PEP 263).

How to use it
-------------------
All python files with inline Hy code must have the following first line
# coding: hy

You can mix Python and Hy code with this syntax:

```
@(defn hello []
(print "hello"))
@(hello)

sum = 1 + @(+ 1 1)
```

After installing Hy, you must install the syntax extension with:
```
python setup.py hysyntax
```
This step add a file hy.pth in your python site-package directory (allows hy syntax extension to be loaded on Python startup).

A test file is provided in tests/contrib/hysyntax.

Any questions, bug reports, and other feedback on this code are welcomed !

Matthieu