Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I build a Python module in Hy?

Tags:

python

lisp

hy

I'd like to use Hy, a dialect of Lisp on top of Python. However my coworkers all use Python and aren't likely to switch over to a Lisp dialect any time soon.

How can I package Hy code into a standard Python module?

like image 866
MRocklin Avatar asked Apr 27 '14 00:04

MRocklin


1 Answers

You have three basic options.

  1. have your coworkers import hy as dg123 wrote.

  2. use a python package and import hy yourself in your packages __init __.py file. Your coworkers can then just import your modules.

  3. compile your module using hyc and deploy the .pyc file which your coworkers can import as normal python module.

like image 107
Felix Benner Avatar answered Oct 13 '22 22:10

Felix Benner