PyML server (Python Markup Language) is a content management framework. Page contents are written in pure Python, Python objects can be created and used to render HTML for remote browsers. PyML has been developped to be very simple and easy to use.
PyML filesEvery web page is a ".pyml" file. Here is a sample of what you can find in such a file:
#! doc doc = Document("Test ExampleDocument", ('/index.css',)) doc.insert(Header("Test ExampleDocument")) link = Link("http://www.python.org") link.insert(Image("http://www.python.org/images/python-logo.gif")) doc.insert(link)
The first line indicates which Python object contains
the main document (
The second one create the main object (
doc = Document("Test ExampleDocument", ('/index.css',))), a new Document with title and link to CSS files.
You can insert whatever you want in every object you create.
For example, in those lines, I add an image to a link and
this link is added to the document.
You can also extend base python objects to fit your needs and
use a wiki based text to write complex strings.
To see more, download and install this server, it is quick and easy. This server will only work on a Unix based box (tested on Linux and *BSD). This server is in a beta stage so don't expect to set up a production server with it...
To use this server, you just have to edit the configuration file lying in the < PYSERVHOME/etc > directory (where < PYSERVHOME/ > is the installation directory of PyML Server). You need to edit the first line, beginning with "pyserv_dir = ..." and write on the right PYSERVHOME/
You can also execute
python setup.py install to update the config file automatically (it will not move the server in your system, it only changes the configuration file).
You can now start the server, go to the < PYSERVHOME/bin/ > directory and as root execute
You can now go with a browser to the URL: http://localhost:8080/ and see for yourself.
svn co https://pymlserver.svn.sourceforge.net/svnroot/pymlserver/trunk/ pyserv/
See for yourself ?
Do you want to see by yourself ? Go to my french home page.