PyHP/README.md

12 lines
833 B
Markdown

# PyHP
Python Hypertext Preprocessor - a naive implementation of an idea I had a while back.... This allows embedding python code in Hypertext in a similar way to PHP.
An example file outlining the format is provided.
# How to use:
Put `pyhi-cgi.sh` somewhere where the server will execute it as CGI script with the environment variable `PYHP` set to point to `pyhp.py`. If the environment variable is unset, `pyhi-cgi.sh` will try to find `pyhp.py` in the same directory as it itself is. Then configure the web server to run `.pyh` files using `pyhi-cgi.sh` as a cgi script.
Alternatively, put `pyhi.sh` and `pyhp.py` somewhere and run `pyhi.sh` with the `.pyh` file as the first argument. Any other command line arguments will be passed to the `.pyh` file. The same `PYHP` environment variable can be used as described above.