ANNOUNCE: PyPHP, Python programming using the PHP web framework
Antony Lesuisse
al at udev.org
Fri Dec 10 17:13:39 EST 2004
PyPHP the python php bridge
===========================
Download it at http://lesuisse.net/pyphp-0.1.tgz
WARNING this is experimental !
Summary:
--------
PyPHP enables Python programming in the PHP web framework.
PyPHP is not yet another Python Web framework, it is the PHP web framework made
available to Python programmers.
With PyPHP you get the best of both Python and PHP world:
- The power, cleanness and robustness of the Python language
- The much used, developped and maintained PHP framework
The most useful PHP framework features you get access to are:
- Session management (using pickle you are be able to store your python objects
in the PHP sessions)
- Persistent database connections
- HTTP authentification
- Ouput buffering and header/cookie management
While most python programmers would favor the Python Standard Library to the
PHP functions library, PyPHP allows PHP programmers to use the PHP functions
from their Python code and brings new features to the Python programmers.
Quickstart:
-----------
Hello world in pyphp, hello.php:
-------------------------------------------------------
<?include("pyphp.php");?>
from pyphp import php
print "Hello World"
-------------------------------------------------------
Accessing php functions, test.php:
-------------------------------------------------------
<?include("pyphp.php");?>
# vim:syntax=python:
from pyphp import php
php.header("Content-Type: text/plain")
print "Hello from python<br>\n"
print php.explode("/","/etc/passwd")
php.eval("print_r($_SERVER);")
--
Antony Lesuisse
More information about the Python-list
mailing list