Divmod Nevow

‘’‘Nevow’‘’ - Pronounced as the French ‘nouveau’, or ‘noo-voh’, Nevow is a web application construction kit written in Python. It is designed to allow the programmer to express as much of the view logic as desired in Python, and includes a pure Python XML expression syntax named stan to facilitate this. However it also provides rich support for designer-edited templates, using a very small XML attribute language to provide bi-directional template manipulation capability.

Nevow also includes formless, a declarative syntax for specifying the types of method parameters and exposing these methods to the web. Forms can be rendered automatically, and form posts will be validated and input coerced, rendering error pages if appropriate. Once a form post has validated successfully, the method will be called with the coerced values.

‘’‘Athena’‘’ - Finally, Nevow includes [http://divmod.org/trac/wiki/DivmodNevow/Athena Athena], a two-way bridge between Javascript in a browser and Python on the server. [http://divmod.org/trac/wiki/DivmodNevow/Athena Athena] is compatible with Mozilla, Firefox, Windows Internet Explorer 6, Opera 9 and Camino ([wiki:DivmodFanClub Don’t see your favorite browser?]). Event handlers can be written in pure Python and Javascript implementation details are hidden from the programmer, with Nevow taking care of routing data to and from the server using [http://www.google.com/search?q=xmlhttprequest XmlHttpRequest]. Athena supports a widget authoring framework that simplifies the authoring and management of client side widgets that need to communicate with the server. Multiple widgets can be hosted on an Athena page without interfering with each other. Athena supports automatic event binding so that that a DHTML event (onclick,onkeypress,etc) is mapped to the appropriate javascript handler (which in turn may call the server).


  • ‘’‘XHTML templates’‘’: contain no programming logic, only nodes tagged with nevow attributes
  • ‘’‘data/render methods’‘’: simplify the task of separating data from presentation and writing view logic
  • ‘’‘stan’‘’: An s-expression-like syntax for expressing xml in pure python
  • ‘’‘Athena’‘’: Cross-browser JavaScript library for sending client side events to the server and server side events to the client after the page has loaded, without causing the entire page to refresh
  • ‘’‘formless’‘’: (take a look at [http://forms-project.pollenation.net/ formal] for an alternate form library) For describing the types of objects which may be passed to methods of your classes, validating and coercing string input from either web or command-line sources, and calling your methods automatically once validation passes.
  • ‘’‘webform’‘’: For rendering web forms based on formless type descriptions, accepting form posts and passing them to formless validators, and rendering error forms in the event validation fails


‘’‘Bleeding Docs’‘’ - ‘’SURGEON GENERAL’S WARNING’‘: Reading the docs listed below pertain to code that has not yet been released and may cause Lung Cancer, Heart Disease, Emphysema, and Pregnancy complications.

[wiki:DivmodNevow/ContextRemoval Context Removal] - Conversion steps for moving from {{{context}}}-based Nevow code to {{{context}}}-less code.


  • To run the examples yourself (Source in [source:trunk/Nevow/examples]):

{{{ #!sh richard@lazar:/tmp$ cd Nevow/examples/ richard@lazar:/tmp/Nevow/examples$ twistd -noy examples.tac 2005/11/02 15:18 GMT [-] Log opened. 2005/11/02 15:18 GMT [-] twistd SVN-Trunk (/usr/bin/python 2.4.2) starting up 2005/11/02 15:18 GMT [-] reactor class: twisted.internet.selectreactor.SelectReactor 2005/11/02 15:18 GMT [-] Loading examples.tac... 2005/11/02 15:18 GMT [-] Loaded. 2005/11/02 15:18 GMT [-] nevow.appserver.NevowSite starting on 8080 2005/11/02 15:18 GMT [-] Starting factory <nevow.appserver.NevowSite instance at 0xb6c8110c> }}} ...visit http://localhost:8080 and you’ll begin to appreciate the possibilities!

Help / Support

You will find plenty of experts on the mailing lists and in the chatrooms who will happily help you, but ‘’‘please’‘’ make sure you ‘’‘read all the documentation’‘’, ‘’‘study all the examples’‘’ and ‘’‘search the mailing list archives’‘’ first. The chances are that your question has already been answered.

Project Versions

Table Of Contents

Previous topic

Divmod Mantissa

Next topic

Divmod PyFlakes

This Page