Python Hypertext Preprocessor - a naive implementation of an idea I had a while back....
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
BodgeMaster 8844d48611 make it work with and without cgi 6 months ago
LICENSE.md add preliminary license 6 months ago
README.md make it work with and without cgi 6 months ago
example.pyh add files from prior development 6 months ago
pyhi-cgi.sh make it work with and without cgi 6 months ago
pyhi.sh make it work with and without cgi 6 months ago
pyhp.py make it work with and without cgi 6 months ago

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.