From d92224cc80f13b8858dcc34010649659efb2ec2a Mon Sep 17 00:00:00 2001 From: "Elf M. Sternberg" Date: Sun, 29 May 2016 09:45:35 -0700 Subject: [PATCH] Moving to MD. Never did like RST. --- README.md | 29 +++++++++++++++++++++++++++++ README.rst | 29 ----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/README.md b/README.md new file mode 100644 index 0000000..4806a7d --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +__polyloader__ is a python module to hook into Python's import machinery +and insert your own syntax parser/recognizer. Importlib uses filename +suffixes to recognize which compiler to use, but is internally +hard-coded to only recognize ".py" as a valid suffix. + +## To use: + +Import polyloader in your python script's launcher or library, as well +as the syntax compiler(s) you plan to use. For example, if you have +[Mochi]()) and +[Hy]() installed, and you wanted to +write a Django app, edit manage.py and add the following lines at the +top: + +~~~~ + from mochi.main import compile_file as mochi_compile + from hy.importer import ast_compile as hy_compile + from polyloader import polyimport + polyimport(mochi_compile, ['.mochi']) + polyimport(hy_compile, ['.hy'])} +~~~~ + +Now your views can be written in Hy and your models in Mochi, and +everything will just work. + +## Dependencies + +polymorph is self-contained. It has no dependencies other than Python +itself and your choice of language. diff --git a/README.rst b/README.rst deleted file mode 100644 index 3da548d..0000000 --- a/README.rst +++ /dev/null @@ -1,29 +0,0 @@ -_polyloader_ is a python module to hook into Python's import machinery -and insert your own syntax parser/recognizer. Importlib uses filename -suffixes to recognize which compiler to use, but is internally -hard-coded to only recognize ".py" as a valid suffix. - -## To use: - -Import polyloader in your python script's launcher or library, as well -as the syntax compiler(s) you plan to use. For example, if you have -[Mochi](https://github.com/i2y/mochi)) and -[Hy](http://docs.hylang.org/en/latest/) installed, and you wanted to -write a Django app, edit manage.py and add the following lines at the -top: - -.. code:: python - from mochi.main import compile_file as mochi_compile - from hy.importer import ast_compile as hy_compile - from polyloader import polyimport - polyimport(mochi_compile, ['.mochi']) - polyimport(hy_compile, ['.hy']) - -Now your views can be written in Hy and your models in Mochi, and -everything will just work. - -## Dependencies - -polymorph is self-contained. It has no dependencies other than Python -itself and your choice of language. -