Python Hypertext Preprocessor - a naive implementation of an idea I had a while back....
 
 
Go to file
BodgeMaster 8844d48611 make it work with and without cgi 2022-04-06 07:09:27 +02:00
LICENSE.md add preliminary license 2022-04-05 02:23:01 +02:00
README.md make it work with and without cgi 2022-04-06 07:09:27 +02:00
example.pyh add files from prior development 2022-04-05 02:25:06 +02:00
pyhi-cgi.sh make it work with and without cgi 2022-04-06 07:09:27 +02:00
pyhi.sh make it work with and without cgi 2022-04-06 07:09:27 +02:00
pyhp.py make it work with and without cgi 2022-04-06 07:09:27 +02:00

README.md

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.