Nevow-0.14.2/0000755000175000017500000000000012761123542014657 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/bin/0000755000175000017500000000000012761123542015427 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/bin/nevow-xmlgettext0000755000175000017500000000010512611541671020713 0ustar mithrandimithrandi00000000000000#!/usr/bin/env python from nevow.scripts.xmlgettext import run run() Nevow-0.14.2/bin/nit0000755000175000017500000000007212611541671016147 0ustar mithrandimithrandi00000000000000#!/usr/bin/python from nevow.scripts.nit import run run() Nevow-0.14.2/debian/0000755000175000017500000000000012761123542016101 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/debian/changelog0000644000175000017500000000330312611541671017753 0ustar mithrandimithrandi00000000000000nevow (0.6.0-1.snapshot) unstable; urgency=low * SVN snapshot. -- Tommi Virtanen Sun, 6 Nov 2005 20:45:27 +0200 nevow (0.6.0-1) unstable; urgency=low * New upstream version. (Closes: #336027) * Acknowledge NMU (Closes: #319230), but please be more careful in the future; no NMU patch was sent to BTS * Remove setupcommon.pyc when cleaning, or dpkg-source will see a binary file content change. * Run unit tests when building. * Clean build tree, distutils fails to remove all of it. * Change priority to extra, as twisted is extra and nevow depends on it. -- Tommi Virtanen Sun, 6 Nov 2005 20:26:39 +0200 nevow (0.4.1-1.1) unstable; urgency=low * NMU * Add missing build depends in python2.4-dev (Closes: #319230) * lintian error: fix package description indent for list items. -- Bastian Kleineidam Sat, 13 Aug 2005 18:48:20 +0200 nevow (0.4.1-1) unstable; urgency=low * New upstream version. * Python 2.4 support. * Not using upstream tarball as it is too broken compared to SVN tag; specifically it is missing nevow/Canvas.fla, which is considered source code. -- Tommi Virtanen Mon, 27 Jun 2005 15:35:57 +0200 nevow (0.3.0-1) unstable; urgency=low * New upstream version. -- Tommi Virtanen Thu, 30 Sep 2004 12:12:44 +0300 nevow (0.2.0-2) unstable; urgency=low * Build-depend on both python2.3-dev and python-dev, it seems that is what cdbs wants. (Closes: #257911) -- Tommi Virtanen Tue, 13 Jul 2004 16:39:17 +0300 nevow (0.2.0-1) unstable; urgency=low * Initial Release. -- Tommi Virtanen Tue, 29 Jun 2004 10:26:36 +0300 Nevow-0.14.2/debian/compat0000644000175000017500000000000212611541671017300 0ustar mithrandimithrandi000000000000004 Nevow-0.14.2/debian/control0000644000175000017500000000625712611541671017517 0ustar mithrandimithrandi00000000000000Source: nevow Section: devel Priority: extra Maintainer: Tommi Virtanen Standards-Version: 3.6.2 Build-Depends-Indep: python-dev, python2.3-dev, python2.4-dev, cdbs, debhelper (>= 4.1.68) Package: python-nevow Architecture: all Depends: python (>= 2.3), python (<< 2.4), python2.3-nevow Description: Web application templating system for Python and Twisted This is a dummy package that only depends on python2.3-nevow. Package: python2.3-nevow Architecture: all Depends: python2.3, python2.3-twisted Description: Web application templating system for Python and Twisted Nevow's main focus is on separating the HTML template from both the business logic and the display logic, while allowing the programmer to write pure Python code as much as possible. It separates your code into 'data' and 'render' functions, a simplified implementation of traditional MVC. It has various parts which can be used individually or as a whole, integrated web solution: . - XHTML templates: contain no programming logic, only nodes tagged with nevow attributes - data/render methods: simplified MVC - stan: An s-expression-like syntax for expressing xml in pure python - formless: 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 - freeform: 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 - livepage: Cross-browser JavaScript glue 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 Package: python2.4-nevow Architecture: all Depends: python2.4, python2.4-twisted Description: Web application templating system for Python and Twisted Nevow's main focus is on separating the HTML template from both the business logic and the display logic, while allowing the programmer to write pure Python code as much as possible. It separates your code into 'data' and 'render' functions, a simplified implementation of traditional MVC. It has various parts which can be used individually or as a whole, integrated web solution: . - XHTML templates: contain no programming logic, only nodes tagged with nevow attributes - data/render methods: simplified MVC - stan: An s-expression-like syntax for expressing xml in pure python - formless: 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 - freeform: 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 - livepage: Cross-browser JavaScript glue 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 Nevow-0.14.2/debian/copyright0000644000175000017500000000045112611541671020035 0ustar mithrandimithrandi00000000000000This package was debianized by Tommi Virtanen tv@debian.org on Sun, 28 Mar 2004 16:44:10 +0300. It was originally downloaded from http://www.divmod.org/Home/Projects/Nevow/ Upstream Author: Donovan Preston et al Copyright: # See the file LICENSE at the top of the source tree. Nevow-0.14.2/debian/python2.3-nevow.manpages0000644000175000017500000000003312611541671022513 0ustar mithrandimithrandi00000000000000doc/man/nevow-xmlgettext.1 Nevow-0.14.2/debian/python2.4-nevow.manpages0000644000175000017500000000003312611541671022514 0ustar mithrandimithrandi00000000000000doc/man/nevow-xmlgettext.1 Nevow-0.14.2/debian/rules0000755000175000017500000000461512611541671017170 0ustar mithrandimithrandi00000000000000#!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- # Copyright © 2002,2003 Colin Walters include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/python-distutils.mk DEB_INSTALL_DOCS_python2.3-nevow := doc/* DEB_INSTALL_EXAMPLES_python2.3-nevow := examples/* DEB_INSTALL_DOCS_python2.4-nevow := doc/* DEB_INSTALL_EXAMPLES_python2.4-nevow := examples/* DEB_DH_ALWAYS_EXCLUDE := .svn docdir = debian/$(1)/usr/share/doc/$(1) binary-post-install/%:: grep -v '^# See the file LICENSE' \ '$(call docdir,$*)/copyright' \ >'$(call docdir,$*)/copyright.tmp' cat LICENSE \ >>'$(call docdir,$*)/copyright.tmp' mv \ '$(call docdir,$*)/copyright.tmp' \ '$(call docdir,$*)/copyright' # see http://bugs.debian.org/295906 cdbs_python_ver = $(filter-out -%,$(subst -, -,$(patsubst python%,%,$(cdbs_curpkg)))) $(patsubst %,binary-post-install/%,$(DEB_PYTHON_REAL_LIB_PACKAGES)):: binary-post-install/%: set -e; for file in debian/$(cdbs_curpkg)/usr/bin/*; do \ sed '1s|.*|#!/usr/bin/python$(cdbs_python_ver)|' $$file >\ "$${file}$(cdbs_python_ver)";\ rm -- "$$file";\ chmod 755 "$${file}$(cdbs_python_ver)";\ mv "debian/$(cdbs_curpkg)/usr/share/man/man1/$$(basename "$$file").1" \ "debian/$(cdbs_curpkg)/usr/share/man/man1/$$(basename "$$file")$(cdbs_python_ver).1";\ done binary-post-install/python2.3-nevow:: set -e; for file in debian/$(cdbs_curpkg)/usr/bin/*;\ do target="$$(echo "$$file" | sed 's/$(cdbs_python_ver)$$//')";\ ln -s "$$(basename "$$file")" "$$target";\ manname="$$(basename "$$target").1.gz";\ ln -s "$$(basename "$$file").1.gz" \ "debian/$(cdbs_curpkg)/usr/share/man/man1/$$manname";\ done clean:: rm -f setupcommon.pyc ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) TRIAL=trial$(cdbs_python_ver) TOPMODULES:=nevow formless $(patsubst %,binary-post-install/%,$(DEB_PYTHON_REAL_LIB_PACKAGES)):: binary-post-install/%: PYTHONPATH='debian/$(cdbs_curpkg)/usr/lib/python$(cdbs_python_ver)/site-packages/' \ '$(TRIAL)' --bwverbose -R $(TOPMODULES) # Importing the modules generates .pyc files, and dh_python (which # normally cleans them) has already been run. Remove them manually. find 'debian/$(cdbs_curpkg)' -name '*.py[co]' -print0 \ | xargs -0 rm -f -- endif clean:: rm -rf _trial_temp # distutils is sloppy and only cleans with the default python version, # leaving all the other stuff still in build clean:: rm -rf build Nevow-0.14.2/doc/0000755000175000017500000000000012761123542015424 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/_static/0000755000175000017500000000000012761123542017052 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/_static/.hidden0000644000175000017500000000000012611547400020271 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/_templates/0000755000175000017500000000000012761123542017561 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/_templates/.hidden0000644000175000017500000000000012611547400021000 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/0000755000175000017500000000000012761123542016564 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/0000755000175000017500000000000012761123542021267 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part00/0000755000175000017500000000000012761123542022375 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part00/listings/0000755000175000017500000000000012761123542024231 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part00/listings/echothing/0000755000175000017500000000000012761123542026201 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part00/listings/echothing/js/0000755000175000017500000000000012761123542026615 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part00/listings/echothing/js/EchoThing.js0000644000175000017500000000144712611541671031032 0ustar mithrandimithrandi00000000000000// import Nevow.Athena Nevow.Athena.Widget.subclass(EchoThing, 'EchoWidget').methods( function __init__(self, node) { EchoThing.EchoWidget.upcall(self, "__init__", node); self.echoWidget = self.nodeByAttribute('name', 'echoElement'); self.scrollArea = self.nodeByAttribute('name', 'scrollArea'); self.message = self.nodeByAttribute('name', 'message'); }, function doSay(self) { self.callRemote("say", self.message.value); self.message.value = ""; return false; }, function addText(self, text) { var newNode = document.createElement('div'); newNode.appendChild(document.createTextNode(text)); self.scrollArea.appendChild(newNode); document.body.scrollTop = document.body.scrollHeight; }); Nevow-0.14.2/doc/howto/chattutorial/part00/listings/echothing/__init__.py0000644000175000017500000000000112611541671030302 0ustar mithrandimithrandi00000000000000 Nevow-0.14.2/doc/howto/chattutorial/part00/listings/echothing/echobox.py0000644000175000017500000000053312611541671030204 0ustar mithrandimithrandi00000000000000from twisted.python.util import sibpath from nevow.athena import LiveElement, expose from nevow.loaders import xmlfile class EchoElement(LiveElement): docFactory = xmlfile(sibpath(__file__, 'template.html')) jsClass = u'EchoThing.EchoWidget' def say(self, message): self.callRemote('addText', message) say = expose(say) Nevow-0.14.2/doc/howto/chattutorial/part00/listings/echothing/template.html0000644000175000017500000000057712611541671030714 0ustar mithrandimithrandi00000000000000

Echo Element

Nevow-0.14.2/doc/howto/chattutorial/part00/listings/nevow/0000755000175000017500000000000012761123542025367 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part00/listings/nevow/plugins/0000755000175000017500000000000012761123542027050 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part00/listings/nevow/plugins/echothing_package.py0000644000175000017500000000023212611541671033043 0ustar mithrandimithrandi00000000000000 from twisted.python import util from nevow import athena import echothing chatthingPkg = athena.AutoJSPackage(util.sibpath(echothing.__file__, 'js')) Nevow-0.14.2/doc/howto/chattutorial/part00/index.rst0000644000175000017500000002021212611547400024230 0ustar mithrandimithrandi00000000000000Toy Echo Application ==================== What is an "Echo Application?" ------------------------------ Our first foray into building an Athena application will be an easy venture: we want to type something in an input box and have it echoed back to us on the same page, without having to reload anything. Why? Well, our eventual goal is to have a working chat server, with all sorts of technical bells and whistles (persistent storage, authentication, etc.), but that's a bit heady for right now. Many of the same principles which we will eventually employ in our chat application exist for a simple case of sending textual messages between a web browser and a server. This is the essence of our "Echo" application. Mental Preparation ------------------ In the :doc:`../intro` and the :doc:`../concepts` pages, we had a refresher on AJAX and COMET and we learned a little bit about what that looks like for Athena. But as we sit down to actually write an Athena application, what do we need to wrap our heads around? Given the introductory knowledge we have, we know that we will need to write some JavaScript, some Python, and if our past experience in developing web applications is any guide, some form of template. This indeed is the case, but here's something big: we're not working with pages and page templates; we're working with "elements", or parts of the DOM tree. We will not be creating page resources; we will be creating just the parts of a "traditional" page that will be dynamic and interactive. Architecture ------------ Now that we've pumped ourselves up and before we start clacking away at the keyboard, we need to get pointed in the right direction. We need a plan. Here's what we know: 1. We will have a server that: - serves dynamic elements in a resource accessible via a URL; - communicates with a client. 2. We will have a client that: - communicates with the server; - updates its DOM tree. The user experience of this application will be the following: 1. they will type text in an input on a form; and 2. the typed text will be rendered to a different part of the page upon hitting a submit button. We will not simply write user input to a ``div`` with JavaScript DOM manipulation, but will instead pass data like we expect will be necessary when we write our chat application. After all, it's probably best to build towards our goal. In order to accomplish this, the application will do something like the following: 1. JavaScript client code will extract user input and send it to our server; 2. Python code will receive messages from the client; 3. Python code will send messages to the client; and 4. a template file (or ``stan`` code) will be used for presentation. Let the Coding Begin -------------------- In a future installment, we will outline the development process from the perspective of test-driven development, in order to not only show how to write unit tests for Athena (Python and JavaScript), but to encourage good programming practices while working with Athena. For now, though, we will just dive right in. Presentation ~~~~~~~~~~~~ Let's start with the easy bit: what our app will look like. Here is the template for our echo application: .. literalinclude:: listings/echothing/template.html :language: html :linenos: Things to note: - This is not a complete HTML document, but is an XHTML template for an "element". - The name space declarations in the top ``div`` tag are necessary for the operation of Athena. - When we hit the "Send" button, our JavaScript class will call the ``doSay()`` method. Writing the Client ~~~~~~~~~~~~~~~~~~ Next up is the JavaScript. We need to send our data to the server. In a full chat application, it would be necessary to send the data to the server so that we could propagate the message to all connected clients. In this case, with the simple echo, we're not going to do anything with the data that gets sent to the server, except send it back, of course. Our JavaScript will need to do several things: 1. import required modules; 2. inherit ``callRemote`` functionality from the base ``Widget`` class; 3. setup convenience attributes; 4. implement the ``doSay()`` method we put in our template above; and 5. implement a method for updating the DOM with data it receives from the server: .. literalinclude:: listings/echothing/js/EchoThing.js :language: javascript :linenos: Points to note: - Those import statements aren't just pretty: they are necessary! In Athena, you need to treat those like you treat the import statements in Python. - The attributes set in the ``__init__()`` method are for convenience when we reference them in other methods. - Note the ``callRemote()`` method in ``doSay()``, As mentioned in the `Concepts <../concepts.html>`__ section, this is how JavaScript is communicating with our Python server. - Another thing about ``doSay``: this is the submit handler. As such, it needs to return false so that the browser is prevented from doing a normal form submission. - ``addText()`` is the method that will be updating the browser DOM once the server sends the data back. There's not much to say about the next one. This is what sets up the relationship between our module name and the actual file itself (so that the JavaScript can be loaded): .. literalinclude:: listings/nevow/plugins/echothing_package.py :language: python :linenos: Writing the Server ~~~~~~~~~~~~~~~~~~ Despite what one might think, writing the server may be the easiest part! If you've created Nevow applications before, then this will look very familiar. The only method we need is one that will send data back to the client. Besides importing the necessary modules and creating a class with some boilerplate, that's about it. Let's take a look at the code: .. literalinclude:: listings/echothing/echobox.py :language: python :linenos: As promised, simple as can be. We do make use of a Twisted utility that simplifies typing the path to our template. Some very important points: - The ``jsClass`` assignment is what connects this code to your JavaScript code. - As discussed in the `Concepts <../concepts.html>`__ section, the ``expose`` decorator is required if our JavaScript is going to be able to call the ``say()`` method. Putting it All Together ~~~~~~~~~~~~~~~~~~~~~~~ Now that we've got all the code in front of us, we can trace out exactly what happens: 1. the user loads the resource in their browser, and the template is rendered; 2. after typing a message in the input box, the user hits submit; 3. upon hitting submit, the client code ``doSay()`` method is called; 4. ``doSay()`` makes a remote call to the Python server method ``say()``; 5. the Python server receives the data when ``say()`` is called, and then it passes that data to the client code's ``addText()`` method; 6. with control back in the client code and data fresh from the server, JavaScript can now update the page's DOM with the new data, and this is what the ``addText()`` method does; 7. when ``addText()`` finishes, the cycle has completed and the browser now displays the latest data input by the user. The Fruits of Our Labor ~~~~~~~~~~~~~~~~~~~~~~~ Now we get to run it! This is a little different than what you may be used to, if you have written Twisted applications in the past. We are using the plugin architecture of Twisted and Nevow such that ``twistd`` will publish our element in an HTTP service. To do this, we will use ``twistd``'s ``athena-widget`` command: :: cd Nevow/doc/howto/chattutorial/part00/listings twistd -n athena-widget --element=echothing.echobox.EchoElement If you executed this against the tutorial code on your local machine, you can now visit `localhost:8080 `__ and start echoing to your heart's content. Summary ------- As you can see, our echo application is a toy app that doesn't do anything very useful. However, it has provided us with a basis for learning how to write working Athena code that lets a browser and server communicate with each other, both sending and receiving data. As such, we now have a solid foundation upon which we can build a functional, useful *and* instructional chat application. Nevow-0.14.2/doc/howto/chattutorial/part01/0000755000175000017500000000000012761123542022376 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part01/listings/0000755000175000017500000000000012761123542024232 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part01/listings/chatthing/0000755000175000017500000000000012761123542026203 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part01/listings/chatthing/js/0000755000175000017500000000000012761123542026617 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part01/listings/chatthing/js/ChatThing.js0000644000175000017500000000321112611541671031024 0ustar mithrandimithrandi00000000000000// import Nevow.Athena Nevow.Athena.Widget.subclass(ChatThing, 'ChatterWidget').methods( function __init__(self, node) { ChatThing.ChatterWidget.upcall(self, "__init__", node); self.chooseBox = self.nodeByAttribute('name', 'chooseBox'); self.scrollArea = self.nodeByAttribute('name', 'scrollArea'); self.sendLine = self.nodeByAttribute('name', 'sendLine'); self.usernameField = self.nodeByAttribute('name', 'username'); self.userMessage = self.nodeByAttribute('name', 'userMessage'); self.loggedInAs = self.nodeByAttribute('name', 'loggedInAs'); }, function doSetUsername(self) { var username = self.usernameField.value; self.callRemote("setUsername", username).addCallback( function (result) { self.chooseBox.style.display = "none"; self.sendLine.style.display = "block"; self.loggedInAs.appendChild(document.createTextNode(username)); self.loggedInAs.style.display = "block"; }); return false; }, function doSay(self) { self.callRemote("say", self.userMessage.value); self.nodeByAttribute('name', 'userMessage').value = ""; return false; }, function displayMessage(self, message) { var newNode = document.createElement('div'); newNode.appendChild(document.createTextNode(message)); self.scrollArea.appendChild(newNode); document.body.scrollTop = document.body.scrollHeight; }, function displayUserMessage(self, avatarName, text) { var msg = avatarName+': '+text; self.displayMessage(msg); }); Nevow-0.14.2/doc/howto/chattutorial/part01/listings/chatthing/__init__.py0000644000175000017500000000000112611541671030304 0ustar mithrandimithrandi00000000000000 Nevow-0.14.2/doc/howto/chattutorial/part01/listings/chatthing/chatterbox.py0000644000175000017500000000237712611541671030732 0ustar mithrandimithrandi00000000000000from twisted.python.util import sibpath from nevow.loaders import xmlfile from nevow.athena import LiveElement, expose class ChatRoom(object): def __init__(self): self.chatters = [] def wall(self, message): for chatter in self.chatters: chatter.wall(message) def tellEverybody(self, who, what): for chatter in self.chatters: chatter.hear(who.username, what) def makeChatter(self): elem = ChatterElement(self) self.chatters.append(elem) return elem # element to be run with twistd chat = ChatRoom().makeChatter class ChatterElement(LiveElement): docFactory = xmlfile(sibpath(__file__, 'template.html')) jsClass = u'ChatThing.ChatterWidget' def __init__(self, room): self.room = room def setUsername(self, username): self.username = username message = ' * user '+username+' has joined the room' self.room.wall(message) setUsername = expose(setUsername) def say(self, message): self.room.tellEverybody(self, message) say = expose(say) def wall(self, message): self.callRemote('displayMessage', message) def hear(self, username, what): self.callRemote('displayUserMessage', username, what) Nevow-0.14.2/doc/howto/chattutorial/part01/listings/chatthing/template.html0000644000175000017500000000145112611541671030706 0ustar mithrandimithrandi00000000000000

Chatter Element

Choose your username:
Logged in as
Nevow-0.14.2/doc/howto/chattutorial/part01/listings/nevow/0000755000175000017500000000000012761123542025370 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part01/listings/nevow/plugins/0000755000175000017500000000000012761123542027051 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/chattutorial/part01/listings/nevow/plugins/chatthing_package.py0000644000175000017500000000023212611541671033045 0ustar mithrandimithrandi00000000000000 from twisted.python import util from nevow import athena import chatthing chatthingPkg = athena.AutoJSPackage(util.sibpath(chatthing.__file__, 'js')) Nevow-0.14.2/doc/howto/chattutorial/part01/index.rst0000644000175000017500000002155512611547400024244 0ustar mithrandimithrandi00000000000000Simple Chat and Two-Way Communications ====================================== Architecture ------------ We'll assume that you've read all the preceding sections of this tutorial and have just finished the "Echo" application example. As such, we don't need to do any more "mental preparation" and can skip straight to a description of the architecture. Fundamentally, this is no different than our echo application: there is a little more chatter that takes place between the client and server; there's another object involved (a ``ChatRoom``); and we'll have to run the server a little differently. Here are the new features we want to support: - login form; - in-memory user storage; - the ability to send global alerts to all users; and - the ability for all users to "hear" when another user speaks in the chat room; A general rule we can establish about our architecture is that if something has to happen for everyone, that code needs to appear on the server side, since it's the server that is keeping track of all users. If something is going to happen irrespective of other users or if browser DOM manipulation is required, then we know the client will be the recipient of the code. As such, in the features above, the login form will be client code. The user storage, global alerts, and "hearing" will be implemented in server code for the data; updating the DOM with that data will be implemented in client code. The user experience of this application will be the following: 1. they will be presented with a login box (no password, only username); 2. upon logging in, a message will be sent to all logged in users that this person has joined, they will see a message at the bottom of the chat that states their login name, and the login form will be replaced with a chat area and a text input field; 3. they will type text in the input field; and 4. the typed text will appear in the browser of every person who is logged in. Building upon our previous example, our application will do the following: 1. JavaScript client code will extract user input and send it to our server; 2. Python code will receive messages from the client; 3. Python code will process these messages; 4. Python code will send messages to the all clients; and 5. a template file (or ``stan`` code) will be used for presentation. More Coding ----------- Presentation ~~~~~~~~~~~~ The template is very similar as it was in the previous example, with the differences being a new login box, a "logged in as" area, and some name changes: .. literalinclude:: listings/chatthing/template.html :language: html :linenos: We've now got two JavaScript methods that need to be defined: ``doSetUsername()`` and ``doSay()``. We can also infer from this template that elements will be hidden and shown after login (note the presence of ``style="display:none"`` in two places). With these observations in hand, let's proceed to the JavaScript code. Writing the Client ~~~~~~~~~~~~~~~~~~ Referring back to our thoughts in the "Architecture" section above, we can establish that the JavaScript code needs the following: - have the same basic boilerplate as in the "echo" example (imports, inheritance, attribute-setting in the constructor); - implement the ``doSetUsername()`` and ``doSay()`` methods; - create a method that will send a message to all users; and - create a method that will let everyone know when someone says something. Let's see how this is done: .. literalinclude:: listings/chatthing/js/ChatThing.js :language: javascript :linenos: There is a little abstraction here: - we need a general message-sending method (``displayMessage()``) for any message that gets sent to all users; - for user chat messages, we need something that will prepend the username so that everyone knows who said what (``displayUserMessage()``), and once this method does its thing, it passes the adjusted message on to ``displayMessage()``. Other than that, this is very straight-forward code; it's pretty much the same as the "Echo" tutorial. The ``display*()`` methods are only responsible for updating the UI, just as we would expect. We also need the same glue that we demonstrated in the "Echo" example: .. literalinclude:: listings/nevow/plugins/chatthing_package.py :language: python :linenos: Writing the Server ~~~~~~~~~~~~~~~~~~ The server code is a bit more complicated. We anticipated this above in the "Architecture" section where we noted that the Python code needs to receive, process and send messages. .. literalinclude:: listings/chatthing/chatterbox.py :language: python :linenos: There is something in our "Chat" code that is not at all present in the "Echo" application: the ``ChatRoom`` object. We need this object for the following functionality: - a means of instantiating new ``ChatterElement`` clients; - a "singleton" instance for keeping track of all ``ChatterElement`` clients; - a means sending messages to all clients; Let's look at the second two reasons first. In our "Chat" application, a new ``ChatterElement`` is created whenever a user connects, so we will have potentially many of these instances. In order for our chat server to function as designed, it will need a way to communicate with each of these. If we create an object that can keep the ``ChatterElement``\ es in a list, then it will be able to iterate that list and call methods that, in turn, make remote calls to the JavaScript. Because we need the chat room to be a singleton object, it can only be instantiated once. But we need many instantiations of ``ChatterElement`` -- one for each connection, in fact. So what do we do? Well, in this case, we make one of the methods of ``ChatRoom`` a factory for instantiating a ``ChatterElement``. Before we return the instance, though, we append it to the list of instances that the ``ChatRoom`` is keeping track of. Putting it All Together ~~~~~~~~~~~~~~~~~~~~~~~ Now that we've got all the code in front of us, we can trace out exactly what happens: 1. the user loads the resource in their browser, and the template is rendered; 2. after typing a message in the input box, the user hits submit; 3. JavaScript client code calls to the server with the text the user submitted; 4. the server gets the message and shares it with all the connected ``ChatterElement``\ s; 5. each ``ChatterElement`` hears this message and passes it back to the JavaScript client; 6. the client prepends the username to the message and then updates the display with the complete message. Keep in mind that ``ChatterElement`` entails several duties: it establishes a relationship with a room object, it "registers" a user (there's a one-to-one mapping between users and ``ChatterElement``), it sends messages to the browser, and it receives messages from the chat room. Being a ``LiveElement`` subclass, ``ChatterElement`` is also responsible for the view (via the document factory). Running with ``twistd`` ~~~~~~~~~~~~~~~~~~~~~~~ One last bit of code that may seem odd is the ``chat`` variable we define right after the ``ChatRoom`` class. What is this? This is how we make all this cleverness work as a twisted plugin. If you recall, in our "Echo" application, we ran the code with the following command: :: twistd -n athena-widget --element=echothing.echobox.EchoElement The value we pass as the ``--element`` argument is the dotted name of the ``LiveElement`` object of which our "web page" is primarily comprised: the ``EchoElement`` object. In our "Chat" application, we have more moving parts: not only do we have the ``ChatterElement`` object, but we have the ``ChatRoom`` object which is responsible for keeping track of many ``ChatterElement``\ es. By defining the ``chat`` variable, we are accomplishing the following all at once: - providing a variable that can be accessed as a dotted name and thus used when starting the server (``chatthing.chatterbox.chat``); - creating a singleton of ``ChatRoom`` (via the "magic" of Python module-level instantiations); - making use of a factory, that when called, will both return a new ``ChatterElement`` instance *and* add itself to the ``ChatRoom``. Running this version of our code is a little bit different than the "Echo" version. This is because of the ``ChatRoom`` code we discussed above. As such, we pass a factory as our element, like so: :: cd Nevow/doc/howto/chattutorial/part01/listings twistd -n athena-widget --element=chatthing.chatterbox.chat If you executed this against the tutorial code on your local machine, you can now visit http://localhost:8080/ and start chatting to your heart's content. Summary ------- Unlike our echo application, the chat application has some real functionality and does some useful stuff: supporting user chats via browser/server two-way communications. It should be evident now how the echo application provided a basic conceptual and (partially) functional foundation upon which our chat work could be based. Nevow-0.14.2/doc/howto/chattutorial/concepts.rst0000644000175000017500000001243412611547400023640 0ustar mithrandimithrandi00000000000000Concepts of Athena: AJAX, COMET, and Python =========================================== Servers and Clients ------------------- COMET applications can seem an almost impenetrable mess when one is first learning about them, much like when writing event-based desktop applications. However, there are some basic concepts that we can emphasize now to circumvent or alleviate most of the confusion. In principle, the problem is very simple: - We want out users to interact with a web page with out having to refresh the page, and we want new data and/or views to be rendered in response to our users' actions; - We want the ability to push updates to user pages from the server to the browser, when the server has new data or views that are ready. As usual, the implementation of the solution is much more complicated than the statement of the problem, but hopefully the way that we have designed Athena will hide those implementation details while providing powerful tools to build the applications you envision. So, let's take a look at what you need to know about servers and clients when building Athena web applications. It is crucial that one understands that when we write Athena applications, we are doing a few different things: - Writing server code in Python that performs server actions - Writing server code in Python that makes remote calls to the browser - Writing browser code in JavaScript that performs browser actions - Writing browser code in JavaScript that makes remote calls to the server Since server-on-server and client-on-client are rather common place and generally well understood, we will ignore those for now. As the other two are the focus of AJAX/COMET and thus also the primary domain of Athena, that is what we will discuss below. Browser-to-server calls are made by Athena via the now-famous XMLHttpRequest. Server-to-browser calls are opened by the browser ahead of time, and when the server is ready, the data is sent to the browser via that connection. JavaScript: Making Calls to the Server -------------------------------------- When creating the JavaScript portion of our applications, we subclass an Athena JavaScript widget, which has a method named ``callRemote()``. By utilizing this method, we can send messages from our JavaScript client to the server (as long as the method we call exists in the server code). For example, in the chat application we will be building in this series of tutorials, we will have a JavaScript class called ``ChatterBox`` with a ``say()`` method, like the following: .. code-block:: javascript function say(self, msg) { self.callRemote("say", msg); // Now show the text to the user somehow... } This will make a remote call to the Python server code, executing the ``say()`` method and passing the ``msg`` variable as a parameter. In Athena, the relationship between the browser code and the server code is established by declaring the JavaScript module in the Python server code, in the following manner: .. code-block:: python class ChatterBox(LiveElement): jsClass = u'ChatThing.ChatterBox' Additionally, in order for the JS to be able to make a call to remote Python code, the Python method has to be exposed. This is a security feature, implemented to ensure the JavaScript code can only call Python methods that have been specifically marked as safe. Appropriately enough, this is done in your Python class with the ``expose`` decorator: .. code-block:: python def say(self, text): for chatter in chatRoom: chatter.youHeardSomething(text) say = expose(say) Python: Making Calls to the Browser ----------------------------------- Now what about the COMET side of the equation? If we want our server to update data in the browser, we need to be able to call JavaScript code from our Python server. We use a similar Python method as the JavaScript one (when making calls from the browser to the server), acquired when our Python class inherited from ``nevow.athena.LiveElement``: .. code-block:: python def hear(self, sayer, text): self.callRemote("hear", sayer, text) In order for this call to work, we need to have the ``hear()`` method defined in our ``ChatterBox`` JavaScript class, and that will look like this: .. code-block:: javascript function hear(self, avatarName, text) { // Here, you'd show the user some text. } Unlike on our Python classes, no special annotations need to be made on the JavaScript side: all JavaScript methods on browser-side Widget objects are allowed to be called by the server. If you've sent code to the browser, you've already forfeited the ability to control when it's called. There wouldn't be a point to limiting the server's rights to run its code when the user can freely run it herself. Summary ------- With the samples above, you should have a growing sense of how Python and JavaScript interact as servers and clients in the world of Athena. In particular, you should be getting a sense of how JavaScript and Python will be interacting in your Athena applications. This has just been a taste of Athena with a few peeks into the code we will be writing. We will cover these topics in greater detail in the following pages, within the context of creating a functional Athena application, complete with step-by-step instructions and rationale. Nevow-0.14.2/doc/howto/chattutorial/env.rst0000644000175000017500000000527412611547400022616 0ustar mithrandimithrandi00000000000000Setting Up the Tutorial Environment and Running Tutorial Source Code ==================================================================== To run this tutorial, you need to have nevow available to python and you'll need the files in the doc/howto tree. You don't even have to install nevow; the examples will run within the source tree. Combinator: The Divmod Way ~~~~~~~~~~~~~~~~~~~~~~~~~~ Using SVN with `Combinator `__ is the best way to try out the example code in-place (and hop between other SVN branches in the future). This is how we develop and test our applications at Divmod. If you have a system installation of Twisted that you don't want to update or interfere with, you can use this method without installing anything. 1. Create a projects directory or change to some other test directory of your choice:: $ mkdir ~/Projects $ cd ~/Projects 2. If you don't have the `twisted library `__, check it out now:: $ svn co svn://svn.twistedmatrix.com/svn/Twisted/trunk Twisted/trunk 3. Then get Combinator and Nevow (and the rest of Divmod). See the `Combinator Tutorial `__ for more about these special checkout paths.:: $ svn co http://divmod.org/svn/Divmod/trunk Divmod/trunk 4. Set up the Combinator environment in this shell. You'll need this step in any future test shells since it adjusts PATH and PYTHONPATH:: $ eval ``python Divmod/trunk/Combinator/environment.py`` $ # (some "link:" lines are normal) 5. Register both the Twisted and Divmod (and thus Nevow+Athena) codebases with Combinator:: $ chbranch Twisted trunk $ chbranch Divmod trunk 6. You can check to see if your environment is ready to go by running the tutorial tests (from any directory, after executing the previous command):: $ trial nevow.test.test\_howtolistings If they all pass, you're ready to begin the tutorial. Standard distutils Installation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you don't want to manage branches and environments with Combinator, you can install our code in the standard ``site-packages`` directory. You'll still need the source tree so you can use the files in doc/howto. For those that would prefer the old way, here's how you do it: 1. Create a projects directory:: $ mkdir ~/Projects $ cd ~/Projects 2. Checkout and install the latest Twisted:: $ svn co svn://svn.twistedmatrix.com/svn/Twisted/trunk Twisted $ cd Twisted $ sudo python setup.py install $ cd ../ 3. Checkout and install Nevow:: $ svn co http://divmod.org/svn/Divmod/trunk/Nevow Nevow $ cd Nevow $ sudo python setup.py install $ cd ../ Nevow-0.14.2/doc/howto/chattutorial/index.rst0000644000175000017500000000301112611547400023120 0ustar mithrandimithrandi00000000000000Nevow Athena from Scratch, or The Evolution of a Chat Application ================================================================= The Chat Tutorial Series ------------------------ Athena is the JavaScript engine behind Nevow, providing a great deal of resources and power to the developer of asynchronous web applications. To demonstrate this, we are using a web chat application as our primary example in this tutorial. The tutorial is split into several parts: a few introductory pages and then independent (but related) tutorials of increasing complexity. .. toctree:: :maxdepth: 2 intro concepts env part00/index part01/index History ------- Nevow's predecessor was Woven (and prior to that, WebMVC). Woven had something called ``LivePage`` that was doing DOM manipulation as far back as 2002. In early 2003, Woven event handlers supported sending JavaScript back to the user's browser, allowing pages to be updated in response to user-generated events. The earliest publicly visible revisions of Nevow made use of XHR (XMLHttpRequest) in early 2004. These facts are notable because Nevow was using AJAX a year before the term was coined in 2005 and had working code in 2002 and 2003 that predated Netscape publishing articles on what they called Inner Browsing where all navigation takes place withing a single page. Again taking the lead, Athena offers features which developers cannot find elsewhere. In this series, we attempt to expose these excellent qualities to the world of application developers. Nevow-0.14.2/doc/howto/chattutorial/intro.rst0000644000175000017500000000771512611547400023163 0ustar mithrandimithrandi00000000000000Introduction ============ Who is this tutorial for? ------------------------- This tutorial is for people who want to build interactive client-server functionality where a web-browser is the client. It will show you how to build a live, interactive chat application that requires nothing more than a web browser that supports JavaScript. The interesting thing about a chat application, which shows why Nevow Athena is special, is that it involves two-way communication. In other words, it involves not only the recently-popular AJAX (the web browser sending commands to the server without loading a new page) but also the trickier and, in our opinion, somewhat cooler technique known as COMET (the web server sending commands to the *browser*). Who is this tutorial *not* for? ------------------------------- Nevow Athena is *not* for people who want a normal web application framework. If you want one of those, you should use non- Athena-\ `Nevow `__, `Django `__, `TurboGears `__, or maybe even `Ruby On Rails `__. Athena doesn't work in terms of pages, links, or HTTP requests and responses; it is a client-server framework that works in terms of widgets, JavaScript objects, and symmetric asynchronous message queues. However, as alluded to above, Athena is part of a larger framework, Nevow, which can be used to build more general-purpose and traditional web applications. AJAX ---- AJAX isn't a technology in and of itself, bur rather an amalgam of technologies used together in order to accomplish the goal of making web applications more responsive than traditional delivery and interactive mechanisms, such as HTML forms submitted to a server. In particular, AJAX consists of the following: - Asynchronous communications from a user's browser to a server - JavaScript - Exchanged data (usually XML or JSON) COMET ----- Historically, the focus of AJAX technologies was user-event driven. However, with the need to update the user's browser with events generated at the server, a solution more sophisticated than AJAX was needed; this has been dubbed COMET. Athena is implemented using both AJAX and COMET techniques, and therefore allows two-way browser <-> server communications. Athena Basics ------------- We've provided brief background information on AJAX/COMET, but what is the purpose of Athena? What makes Athena different than other solutions? Here are a few key points that should help with these questions: - Athena exists to make writing COMET web applications easy. - Athena is written in Python and JavaScript - It is written to be used with Nevow, a `Twisted `__-based web framework. - Similar to Twisted's `Perspective Broker `__, Athena employs remote calls. Athena was written by Twisted and Divmod developers (in addition to contributing members of the community) in order to bring the outdated and Nevow-incompatible Woven LivePage technology to Nevow. In addition, it was an opportunity to improve upon the original design and incorporate new features to address the growing needs of developers. Target Applications ------------------- Good candidates for Athena web applications would include those where the application needs to respond to user input and/or updates from servers, such as the following: - conference software (e.g. whiteboard, shared text, chat, etc.) - mail clients - interactive, multi-player games - social networking tools - office applications (e.g., spreadsheets, word processors, etc.) Target Developers ----------------- Anyone who wants to create interactive, web-based applications is a potential Nevow/Athena user. It's best to have some background in writing web applications, and in addition, to know how to use Nevow. However, we hope that this tutorial will be just as useful for beginners as experienced developers. Nevow-0.14.2/doc/howto/listings/0000755000175000017500000000000012761123542020420 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/listings/gettingstarted/0000755000175000017500000000000012761123542023450 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/doc/howto/listings/gettingstarted/helloworld.py0000644000175000017500000000020712611541671026175 0ustar mithrandimithrandi00000000000000from nevow import loaders, rend class HelloWorld(rend.Page): addSlash = True docFactory = loaders.xmlfile('helloworld.html') Nevow-0.14.2/doc/howto/listings/gettingstarted/helloworld.tac0000644000175000017500000000047012611541671026316 0ustar mithrandimithrandi00000000000000from twisted.application import internet from twisted.application import service from nevow import appserver import helloworld application = service.Application('helloworld') site = appserver.NevowSite(helloworld.HelloWorld()) webServer = internet.TCPServer(8080, site) webServer.setServiceParent(application) Nevow-0.14.2/doc/howto/deployment.rst0000644000175000017500000001024512652003262021473 0ustar mithrandimithrandi00000000000000Deployment ========== Nevow includes two major phases for deciding what HTML to render. :doc:`traversal` is the procedure by which a URL is mapped to a Python object which will perform the HTML generation. :ref:`glossary-page_rendering` is the process by which data objects are combined with an HTML template to produce the final output. Before any of this can take place, however, we must have an environment in which our Python code can run in response to an HTTP request, and HTML can be returned to the browser for rendering. This is called the :ref:`glossary-deployment_environment`. There are various deployment options for Nevow page code: - CGI: Simple deployment in almost any HTTP server - WSGI: A more complete and flexible way for deploying on many HTTP servers - Twisted.Web: A standalone application server process which includes a built-in HTTP server - Zomne: A small CGI which hands off HTTP requests to a long-running application server process, similar to FastCGI or SCGI CGI --- You can deploy Nevow on any webserver which uses the Common Gateway Interface. Using this method, your code is responsible for properly formatting and outputting the HTTP response headers, and Nevow is used only to generate the HTML body of your page. Here is the simplest possible CGI: .. code-block:: python #!/usr/bin/env python print "Content-type: text/plain\r\n\r\n", from nevow import rend, loaders class HelloWorld(rend.Page): docFactory = loaders.stan("Hello, world!") print HelloWorld().renderSynchronously() With this simple CGI you can use the Nevow template loaders and standard nevow template interpolation techniques in your CGIs. However, you do not get any :doc:`traversal` features, and you have to generate HTTP headers yourself. WSGI is a slightly higher-level deployment option which does not suffer these problems. Twisted.Web ----------- A convenient and powerful way to deploy Nevow applications is inside a process running the twisted.web HTTP server. With Python, Twisted, and Nevow installed, you have all you need to run a Web Application, with no other dependencies or external HTTP servers such as Apache required. Running your Nevow applications under twisted.web also gives you access to some of the more advanced "Live" features of Nevow, such as ``nevow.athena``. Currently, these modules require more control over the HTTP socket than CGI can provide. (This may change in the future.) Deploying a Nevow application under twisted.web requires a little more boilerplate, but can be considerably easier to set up than other deployment options because there are no external dependencies. Note that normally you should declare your Page classes in modules external to the twisted configuration file, but everything is included in one file here for brevity. Here is the minimal configuration file required to use Nevow with twisted.web: .. code-block:: python from nevow import rend, loaders, appserver class HelloWorld(rend.Page): docFactory = loaders.stan("Hello, world!") from twisted.application import service, internet application = service.Application("hello-world") internet.TCPServer(8080, appserver.NevowSite(HelloWorld())).setServiceParent(application) Save this file as "helloworld.tac" and start the server using the command: :: twistd -noy helloworld.tac Then visit your twisted.web server by viewing the url "http://localhost:8080/" in your browser. See the twistd man page for more information about what twistd is capable of, including daemonizing the HTTP server. Conclusion ---------- Nevow may be deployed in a number of environments, from the most restrictive to the most permissive. Writing a CGI can be an easy way to try out the Nevow templating mechanism, but can be slow. A long-running application server process can be a good way to get good performance as well as additional features such as in-memory server-side sessions, advanced automatic form handling with formless, and live page updating features such as nevow.athena. Which deployment option you choose will depend on the amount of control you have over your deployment environment, and what advanced features your application will require. Nevow-0.14.2/doc/howto/gettingstarted.rst0000644000175000017500000000541612611547400022351 0ustar mithrandimithrandi00000000000000Getting Started =============== Warning: This document has only just been started. It's not going to get you very far right now. Nevow is a reasonably large library and can be quite daunting at first. This document's aim is to guide the first time user in building a Nevow application. Our First Application --------------------- Let's dive straight in, here's the code for our first (very, very simple) application. Create the following module, ``helloworld.py``: .. literalinclude:: listings/gettingstarted/helloworld.py :language: python :linenos: It looks quite simple but let's walk through it anyway. First, we import two Nevow modules. ``nevow.loaders`` contains template loaders of which the two most useful are ``xmlfile`` and ``stan``. ``xmlfile`` can load any well-formed XML (i.e. XHTML) file; ``stan`` loads a stan tree (more on these later). The other module, ``nevow.rend``, contains all Nevow's standard renders, many of which we'll meet in this document. We then define the ``HelloWorld`` class that subclasses ``rend.Page``, Nevow's main resource class. ``HelloWorld`` has two class attributes. ``addSlash`` tells ``rend.Page`` to redirect to a version of the request URL that ends in a ``/`` if necessary. You generally want to set this to ``True`` for the root resource. ``docFactory`` tells the page instance where to get the template from. In this case we're providing a loader that parses an HTML file (not shown) from disk. Hmm, ok I hear you say but how do I see it. Well, Twisted provides a good web server which we can use. Twisted also includes a clever little application for starting Twisted applications. Here's the ``helloworld.tac`` file, a Twisted Application Configuration: .. literalinclude:: listings/gettingstarted/helloworld.tac :language: python :linenos: Give it a go, run the following and connect to http://localhost:8080/ to see your application: :: twistd -ny helloworld.tac You'll probably notice that you get log output on the console. This is just one of the good things that twistd does. It can also daemonize the application, shed privileges if run as root, etc. TAC files are covered in more detail in the Twisted documentation but let's quickly explain what all this does anyway. When ``twistd`` starts up it loads the ``.tac`` file (it's just Python) and looks for the attribute called ``application``. When ``twistd`` is all ready to go it starts the ``application``. The application is not much use unless it actually does something so the next thing we do is create a ``NevowSite`` instance, ``site``, and pass it a root resource, a ``HelloWorld`` instance. Finally, we create a TCP server that makes the site available on port 8080 and bind the server to the application to ensure the server is started when the application is started. Nevow-0.14.2/doc/howto/glossary.rst0000644000175000017500000000443012611547400021157 0ustar mithrandimithrandi00000000000000Glossary ======== Object Traversal ---------------- The process by which a Python object is located to render HTML for a given HTTP URL. For example, given the URL http://example.com/foo/bar, Object Traversal will begin at the "Root Resource" object by asking it for an object which is capable of rendering the page at ('foo', 'bar'). The "Root Resource" returns an object and a list of unhandled path segments, and the traversal continues across this new Resource object until all path segments have been consumed. .. _glossary-page_rendering: Page Rendering -------------- The process by which a Python object, usually a rend.Page subclass, turns itself into HTML. Page Rendering involves locating some page data, loading a template document, and applying the template to the data, in the process generating HTML. .. _glossary-deployment_environment: Deployment Environment ---------------------- The environment in which a Nevow application is deployed. Generally involves an HTTP server which is configured to route certain (or all) HTTP requests through the Nevow Object Traversal and Page Rendering process. Deployment environments include CGI, WSGI, and twisted.web. DOM --- Document Object Model. A tree of objects which represent the structure of an XHTML document in memory. Nevow uses a nonstandard DOM named "stan", which is made up of simple Python lists, dicts, strings, and nevow.stan.Tag instances. Flattener --------- A Python function which knows how to translate from a rich type to a string containing HTML. For example, the integer flattener calls str() on the integer. The string flattener escapes characters which are unsafe in HTML, such as <, >, and &. Tag --- A class, defined at nevow.stan.Tag, which holds information about a single HTML tag in a DOM. Tag instances have three attributes: tagName, attributes, and children. tagName is a string indicating the tag name. attributes is a dict indicating the HTML attributes of that node. children is a list indicating the child nodes of that node. Tag Specials ------------ A Tag attribute which is "special" to nevow. Tag specials include data, render, pattern, slot, and macro. Tag Specials will never be output as HTML attributes of tags, but will be used by the internal Nevow rendering process to influence how the Tag is rendered. Nevow-0.14.2/doc/howto/intro.rst0000644000175000017500000002057512652003262020455 0ustar mithrandimithrandi00000000000000============ Introduction ============ Summary ------- Nevow is a next-generation web application templating system, based on the ideas developed in the Twisted Woven package. Its main focus is on separating the HTML template from both the business logic and the display logic, while allowing the programmer to write pure Python code as much as possible. It separates your code into 'data' and 'render' functions, a simplified implementation of traditional MVC. It has various parts which can be used individually or as a whole, integrated web solution: - XHTML templates: contain no programming logic, only nodes tagged with nevow attributes - data/render methods: simplified MVC - stan: An s-expression-like syntax for expressing xml in pure python - formless: 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 - formless.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 Disk based templates -------------------- Nevow includes the ability to load templates off disk. These templates may have processing directives which cause the execution of python methods at render time. The attribute technique was inspired by the attributes used by ZPT. However, no actual code may be embedded in the HTML template: .. code-block:: html Greetings!

Now I will greet you:

This template can then be loaded and rendered like so: .. code-block:: python class Greeter(rend.Page): docFactory = loaders.xmlfile("Greeting.html") def render_greet(self, context, data): return random.choice(["Hello", "Greetings", "Hi"]), " ", data Greeter("My name is").renderString() data/render methods ------------------- To allow clean isolation between code which fetches data from a data source and code which renders the data into HTML, nevow allows you to write both 'data' methods and 'render' methods. These concepts are inspired by MVC, but simpler, since the framework can handle most of the controller aspect. An example: .. code-block:: html This template can be loaded and rendered using a class such as this: .. code-block:: python class Colorful(rend.Page): docFactory = loaders.xmlfile("Colorful.html") def render_colorful(self, context, data): color = random.choice(['red', 'green', 'blue']) return context.tag(style="color: %s" % color) def data_name(self, context, data): return "Your name here" def data_fun(self, context, data): return "Are we having fun yet?" Stan ---- One of the most powerful things about nevow is stan, an s-expression-like syntax for producing XML fragments in pure Python syntax. Stan is not required for using nevow, but it is both a simple and powerful way to both lay out one's XHTML templates and express one's display logic. A brief example will illustrate its utility: .. code-block:: python import random from nevow import rend, tags class Greeter(rend.Page): def greet(self, context, data): return random.choice(["Hello", "Greetings", "Hi"]), " ", data docFactory = loaders.stan( tags.html[ tags.head[ tags.title[ "Greetings!" ]], tags.body[ tags.h1(style="font-size: large")[ "Now I will greet you:" ], greet ] ]) When the Greeter class is constructed, it is passed a Python object which will be used as that page's data: .. code-block:: python Greeter("Your name here").renderString() Formless -------- Python is dynamically typed, which means it has no built-in controls for enforcing the types of objects which are passed to one's methods. This is great for programmers, but not necessarily great if you are going to be passing user-entered input to those methods. Formless is a simple way to describe the types of objects that can be passed to one's methods, as well as coerce from string input to those types. Other code can then accept user input from a command line or from a web form, validate the input against the types described using formless, and call the method once validation has passed. A simple example: .. code-block:: python from zope.interface import implements from formless.annotate import TypedInterface, Integer, String class ISimpleMethod(TypedInterface): def simple(self, name=String(description="Your name."), age=Integer(description="Your age.")): """ Simple Please enter your name and age. """ class Implementation(object): implements(ISimpleMethod) def simple(self, name, age): print "Hello, %s, who is %s" % (name, age) Webform ------- Webform is a nevow module which will automatically render web forms and accept form posts based on types described using the classes in formless. Used in conjunction with the twisted.web HTTP server, the process is almost automatic: .. code-block:: python from nevow import rend, tags from formless import webform class WebForm(rend.Page): document = rend.stan( tags.html[ tags.body[ h1["Here is the form:"], webform.renderForms('original') ] ]) resource = WebForm(Implementation()) Exposing this resource instance to the web using twisted.web and visiting it will cause a form with two input boxes to be rendered. Posting the form will cause form validation to occur. Upon error, the user will be returned to the original page, with the form annotated with error messages. Upon success, the "simple" method of the Implementation instance will be called and passed a string and an integer. LivePage -------- LivePage was a Woven technology which allowed programmers to receive server- side notification of client-side JavaScript events, and to send JavaScript to the client in response to a server-side event. New for Nevow 0.3, LivePage has been updated to support Mozilla, Firefox, IE6 Win, and Safari. Using LivePage is very easy: .. code-block:: python from nevow.liveevil import handler def greeter(client, nodeName): client.alert("Greetings. You clicked the %s node." % nodeName) # Any string arguments after the event handler function will be evaluated # as JavaScript in the context of the web browser and results passed to the # Python event handler handler = handler(greeter, 'node.name') class Live(rend.Page): docFactory = loaders.stan( tags.html[ tags.body[ ol[ li(onclick=handler, name="one")["One"] li(onclick=handler, name="two")["Two"] li(onclick=handler, name="three")["Three"] ] ] ]) More Information ---------------- The `Nevow website `__ has more information. Starting with 0.3, it contains a simple WSGI implementation and can also be used to render CGIs. However, the recommended mode of operation is using the `Twisted web `__ server. Nevow is an active project, and many new bugfixes and features are committed to the Nevow Git repository. Information about Nevow commits is available by subscribing to the `Divmod commits `__ mailing list. The Nevow Git repository can be checked out using: :: git clone git://github.com/twisted/nevow Discussion of Nevow occurs on the `twisted.web mailing list `__. The Nevow developers are also often available for real-time help on the `#twisted.web channel `__ on irc.freenode.net. Nevow-0.14.2/doc/howto/publishing.rst0000644000175000017500000005471212611547400021470 0ustar mithrandimithrandi00000000000000Object Publishing ================= In :doc:`traversal`, we learned about the ``nevow.inevow.IResource.renderHTTP`` method, which is the most basic way to send HTML to a browser when using Nevow. However, it is not very convenient (or clean) to generate HTML tags by concatenating strings in Python code. In the :doc:`deployment` documentation, we saw that it was possible to render a *Hello World* page using a ``nevow.rend.Page`` subclass and providing a ``docFactory``: .. code-block:: python >>> from nevow import rend, loaders >>> class HelloWorld(rend.Page): ... docFactory = loaders.stan("Hello, world!") ... >>> HelloWorld().renderSynchronously() 'Hello, world!' This example does nothing interesting, but the concept of a loader is important in Nevow. The ``rend.Page.renderHTTP`` implementation always starts rendering HTML by loading a template from the ``docFactory``. The stan DOM ------------ Nevow uses a DOM-based approach to rendering HTML. A tree of objects is first constructed in memory by the template loader. This tree is then processed one node at a time, applying functions which transform from various Python types to HTML strings. Nevow uses a nonstandard DOM named "stan". Unlike the W3C DOM, stan is made up of simple python lists, strings, and instances of the nevow.stan.Tag class. During the rendering process, "Flattener" functions convert from rich types to HTML strings. For example, we can load a template made up of some nested lists and Python types, render it, and see what happens: .. code-block:: python >>> class PythonTypes(rend.Page): ... docFactory = loaders.stan(["Hello", 1, 1.5, True, ["Goodbye", 3]]) ... >>> PythonTypes().renderSynchronously() 'Hello11.5TrueGoodbye3' Tag instances ------------- So far, we have only rendered simple strings as output. However, the main purpose of Nevow is HTML generation. In the stan DOM, HTML tags are represented by instances of the ``nevow.stan.Tag`` class. ``Tag`` is a very simple class, whose instances have an ``attributes`` dictionary and a ``children`` list. The ``Tag`` flattener knows how to recursively flatten attributes and children of the tag. To show you how ``Tag``\ s really work before you layer Nevow's convenience syntax on top, try this horrible example: .. code-block:: python >>> from nevow import stan >>> h = stan.Tag('html') >>> d = stan.Tag('div') >>> d.attributes['style'] = 'border: 1px solid black' >>> h.children.append(d) >>> class Tags(rend.Page): ... docFactory = loaders.stan(h) ... >>> Tags().renderSynchronously() '
' So, we see how it is possible to programatically generate HTML by constructing and nesting stan ``Tag`` instances. However, it is far more convenient to use the overloaded operators ``Tag`` provides to manipulate them. ``Tag`` implements a ``__call__`` method which takes any keyword arguments and values and updates the attributes dictionary; it also implements a ``__getitem__`` method which takes whatever is between the square brackets and appends them to the children list. A simple example should clarify things: .. code-block:: python >>> class Tags2(rend.Page): ... docFactory = loaders.stan(stan.Tag('html')[stan.Tag('div')(style="border: 1px solid black")]) ... >>> Tags2().renderSynchronously() '
' This isn't very easy to read, but luckily we can simplify the example even further by using the nevow.tags module, which is full of "Tag prototypes" for every tag type described by the XHTML 1.0 specification: .. code-block:: python >>> class Tags3(rend.Page): ... docFactory = loaders.stan(tags.html[tags.div(style="border: 1px solid black")]) ... >>> Tags3().renderSynchronously() '
' Using stan syntax is not the only way to construct template DOM for use by the Nevow rendering process. Nevow also includes ``loaders.xmlfile`` which implements a simple tag attribute language similar to the Zope Page Templates (ZPT) Tag Attribute Language (TAL). However, experience with the stan DOM should give you insight into how the Nevow rendering process really works. Rendering a template into HTML in Nevow is really nothing more than iterating a tree of objects and recursively applying "Flattener" functions to objects in this tree, until all HTML has been generated. Functions in the DOM -------------------- So far, all of our examples have generated static HTML pages, which is not terribly interesting when discussing dynamic web applications. Nevow takes a very simple approach to dynamic HTML generation. If you put a Python function reference in the DOM, Nevow will call it when the page is rendered. The return value of the function replaces the function itself in the DOM, and the results are flattened further. This makes it easy to express looping and branching structures in Nevow, because normal Python looping and branching constructs are used to do the job: .. code-block:: python >>> def repeat(ctx, data): ... return [tags.div(style="color: %s" % (color, )) ... for color in ['red', 'blue', 'green']] ... >>> class Repeat(rend.Page): ... docFactory = loaders.stan(tags.html[repeat]) ... >>> Repeat().renderSynchronously() '
' However, in the example above, the repeat function isn't even necessary, because we could have inlined the list comprehension right where we placed the function reference in the DOM. Things only really become interesting when we begin writing parameterized render functions which cause templates to render differently depending on the input to the web application. The required signature of functions which we can place in the DOM is (ctx, data). The "context" object is essentially opaque for now, and we will learn how to extract useful information out of it later. The "data" object is anything we want it to be, and can change during the rendering of the page. By default, the data object is whatever we pass as the first argument to the Page constructor, *or* the Page instance itself if nothing is passed. Armed with this knowledge, we can create a Page which renders differently depending on the data we pass to the Page constructor: .. code-block:: python class Root(rend.Page): docFactory = loaders.stan(tags.html[ tags.h1["Welcome."], tags.a(href="foo")["Foo"], tags.a(href="bar")["Bar"], tags.a(href="baz")["Baz"]]) def childFactory(self, ctx, name): return Leaf(name) def greet(ctx, name): return "Hello. You are visiting the ", name, " page." class Leaf(rend.Page): docFactory = loaders.stan(tags.html[greet]) Armed with this knowledge and the information in the :doc:`traversal` documentation, we now have enough information to create dynamic websites with arbitrary URL hierarchies whose pages render dynamically depending on which URL was used to access them. Accessing query parameters and form post data --------------------------------------------- Before we move on to more advanced rendering techniques, let us first examine how one could further customize the rendering of a Page based on the URL query parameters and form post information provided to us by a browser. Recall that URL parameters are expressed in the form: :: http://example.com/foo/bar?baz=1&quux=2 And form post data can be generated by providing a form to a browser: .. code-block:: html
Accessing this information is such a common procedure that Nevow provides a convenience method on the context to do it. Let's examine a simple page whose output can be influenced by the query parameters in the URL used to access it: .. code-block:: python def showChoice(ctx, data): choice = ctx.arg('choice') if choice is None: return '' return "You chose ", choice, "." class Custom(rend.Page): docFactory = loaders.stan(tags.html[ tags.a(href="?choice=baz")["Baz"], tags.a(href="?choice=quux")["Quux"], tags.p[showChoice]]) The procedure is exactly the same for simple form post information: .. code-block:: python def greet(ctx, data): name = ctx.arg('name') if name is None: return '' return "Greetings, ", name, "!" class Form(rend.Page): docFactory = loaders.stan(tags.html[ tags.form(action="", method="POST")[ tags.input(name="name"), tags.input(type="submit")], greet]) Note that ``ctx.arg`` returns only the first argument with the given name. For complex cases where multiple arguments and lists of argument values are required, you can access the request argument dictionary directly using the syntax: .. code-block:: python def arguments(ctx, data): args = inevow.IRequest(ctx).args return "Request arguments are: ", str(args) Generators in the DOM --------------------- One common operation when building dynamic pages is iterating a list of data and emitting some HTML for each item. Python generators are well suited for expressing this sort of logic, and code which is written as a python generator can perform tests (``if``) and loops of various kinds (``while``, ``for``) and emit a row of html whenever it has enough data to do so. Nevow can handle generators in the DOM just as gracefully as it can handle anything else: .. code-block:: python >>> from nevow import rend, loaders, tags >>> def generate(ctx, items): ... for item in items: ... yield tags.div[ item ] ... >>> class List(rend.Page): ... docFactory = loaders.stan(tags.html[ generate ]) ... >>> List(['one', 'two', 'three']).renderSynchronously() '
one
two
three
' As you can see, generating HTML inside of functions or generators can be very convenient, and can lead to very rapid application development. However, it is also what I would call a "template abstraction violation", and we will learn how we can keep knowledge of HTML out of our python code when we learn about patterns and slots. Methods in the DOM ------------------ Up until now, we have been placing our template manipulation logic inside of simple Python functions and generators. However, it is often appropriate to use a method instead of a function. Nevow makes it just as easy to use a method to render HTML: .. code-block:: python class MethodRender(rend.Page): def __init__(self, foo): self.foo = foo def render_foo(self, ctx, data): return self.foo docFactory = loaders.stan(tags.html[ render_foo ]) Using render methods makes it possible to parameterize your Page class with more parameters. With render methods, you can also use the Page instance as a state machine to keep track of the state of the render. While Nevow is designed to allow you to render the same Page instance repeatedly, it can also be convenient to know that a Page instance will only be used one time, and that the Page instance can be used as a scratch pad to manage information about the render. Data specials ------------- Previously we saw how passing a parameter to the default Page constructor makes it available as the "data" parameter to all of our render methods. This "data" parameter can change as the page render proceeds, and is a useful way to ensure that render functions are isolated and only act upon the data which is available to them. Render functions which do not pull information from sources other than the "data" parameter are more easily reusable and can be composed into larger parts more easily. Deciding which data gets passed as the data parameter is as simple as changing the "Data special" for a Tag. See the :doc:`glossary` under "Tag Specials" for more information about specials. Assigning to the data special is as simple as assigning to a tag attribute: .. code-block:: python >>> def hello(ctx, name): ... return "Hello, ", name ... >>> class DataSpecial(rend.Page): ... docFactory = loaders.stan(tags.html[ ... tags.div(data="foo")[ hello ], ... tags.div(data="bar")[ hello ]]) ... >>> DataSpecial().renderSynchronously() '
Hello, foo
Hello, bar
' Data specials may be assigned any python value. Data specials are only in scope during the rendering of the tag they are assigned to, so if the "hello" renderer were placed in the DOM inside the html node directly, "Hello, None" would be output. Before data is passed to a render function, Nevow first checks to see if there is an ``IGettable`` adapter for it. If there is, it calls ``IGettable.get()``, and passes the result of this as the data parameter instead. Nevow includes an ``IGettable`` adapter for python functions, which means you can set a Tag data special to a function reference and Nevow will call it to obtain the data when the Tag is rendered. The signature for data methods is similar to that of render methods, (ctx, data). For example: .. code-block:: python def getName(ctx, data): return ctx.arg('name') def greet(ctx, name): return "Greetings, ", name class GreetName(rend.Page): docFactory = loaders.stan(tags.html[ tags.form(action="")[ tags.input(name="name"), tags.input(type="submit")], tags.div(data=getName)[ greet ]]) Data specials exist mainly to allow you to construct and enforce a Model-View- Controller style separation of the Model code from the View. Here we see that the greet function is capable of rendering a greeting view for a name model, and that the implementation of getName may change without the view code changing. Render specials --------------- Previously, we have seen how render functions can be placed directly in the DOM, and the return value replaces the render function in the DOM. However, these free functions and methods are devoid of any contextual information about the template they are living in. The render special is a way to associate a render function or method with a particular Tag instance, which the render function can then examine to decide how to render: .. code-block:: python >>> def alignment(ctx, data): ... align = ctx.tag.attributes.get('align') ... if align == 'right': ... return ctx.tag["Aligned right"] ... elif align == 'center': ... return ctx.tag["Aligned center"] ... else: ... return ctx.tag["Aligned left"] ... >>> class AlignmentPage(rend.Page): ... docFactory = loaders.stan(tags.html[ ... tags.p(render=alignment), ... tags.p(render=alignment, align="center"), ... tags.p(render=alignment, align="right")]) ... >>> AlignmentPage().renderSynchronously() '

Aligned left

Aligned center

Aligned right

' Note how the alignment renderer has access to the template node as ``ctx.tag``. It can examine and change this node, and the return value of the render function replaces the original node in the DOM. Note that here we are returning the template node after changing it. We will see later how we can instead mutate the context and use slots so that the knowledge the renderer requires about the structure of the template is reduced even more. Pattern specials ---------------- When writing render methods, it is easy to inline the construction of Tag instances to generate HTML programatically. However, this creates a template abstraction violation, where part of the HTML which will show up in the final page output is hidden away inside of render methods instead of inside the template. Pattern specials are designed to avoid this problem. A node which has been tagged with a pattern special can then be located and copied by a render method. The render method does not need to know anything about the structure or location of the pattern, only it's name. We can rewrite our previous generator example so that the generator does not have to know what type of tag the template designer would like repeated for each item in the list: .. code-block:: python >>> from nevow import rend, loaders, tags, inevow >>> def generate(ctx, items): ... pat = inevow.IQ(ctx).patternGenerator('item') ... for item in items: ... ctx.tag[ pat(data=item) ] ... return ctx.tag ... >>> def string(ctx, item): ... return ctx.tag[ str(item) ] ... >>> class List(rend.Page): ... docFactory = loaders.stan(tags.html[ ... tags.ul(render=generate)[ ... tags.li(pattern="item", render=string)]]) ... >>> List([1, 2, 3]).renderSynchronously() '
  1. 1
  2. 2
  3. 3
' Note that we have to mutate the tag in place and repeatedly copy the item pattern, applying the item as the data special to the resulting Tag. It turns out that this is such a common operation that nevow comes out of the box with these two render functions: .. code-block:: python >>> class List(rend.Page): ... docFactory = loaders.stan(tags.html[ ... tags.ul(render=rend.sequence)[ ... tags.li(pattern="item", render=rend.data)]]) ... >>> List([1, 2, 3]).renderSynchronously() '
  • 1
  • 2
  • 3
' Slot specials ------------- The problem with render methods is that they are only capable of making changes to their direct children. Because of the architecture of Nevow, they should not attempt to change grandchildren or parent nodes. It is possible to write one render method for every node you wish to change, but there is a better way. A node with a slot special can be "filled" with content by any renderer above the slot. Creating a slot special is such a frequent task that there is a prototype in ``nevow.tags`` which is usually used. Let us examine a renderer which fills a template with information about a person: .. code-block:: python >>> from nevow import loaders, rend, tags ... >>> person = ('Donovan', 'Preston', 'Male', 'California') ... >>> def render_person(ctx, person): ... firstName, lastName, sex, location = person ... ctx.fillSlots('firstName', firstName) ... ctx.fillSlots('lastName', lastName) ... ctx.fillSlots('sex', sex) ... ctx.fillSlots('location', location) ... return ctx.tag ... >>> class PersonPage(rend.Page): ... docFactory = loaders.stan(tags.html(render=render_person)[ ... tags.table[ ... tags.tr[ ... tags.td[tags.slot('firstName')], ... tags.td[tags.slot('lastName')], ... tags.td[tags.slot('sex')], ... tags.td[tags.slot('location')]]]]) ... >>> PersonPage(person).renderSynchronously() '
DonovanPrestonMaleCalifornia
' Using patterns in combination with slots can lead to very powerful template abstraction. Nevow also includes another standard renderer called "mapping" which takes any data which responds to the "items()" message and inserts the items into appropriate slots: .. code-block:: python >>> class DictPage(rend.Page): ... docFactory = loaders.stan(tags.html(render=rend.mapping)[ ... tags.span[ tags.slot('foo') ], tags.span[ tags.slot('bar') ]]) ... >>> DictPage(dict(foo=1, bar=2)).renderSynchronously() '12' Data directives --------------- So far, we have always placed data functions directly in the Data special attribute of a Tag. Sometimes, it is preferable to look up a data method from the Page class as the Page has being rendered. For example, a base class may define a template and a subclass may provide the implementation of the data method. We can accomplish this effect by using a data directive as a Tag's data special: .. code-block:: python class Base(rend.Page): docFactory = loaders.stan(tags.html[ tags.div(data=tags.directive('name'), render=rend.data)]) class Subclass(Base): def data_name(self, ctx, data): return "Your name" The data directive is resolved by searching for the ``IContainer`` implementation in the context. ``rend.Page`` implements ``IContainer.get`` by performing an attribute lookup on the Page with the prefix 'data\_\*'. You can provide your own ``IContainer`` implementation if you wish, and also you should know that ``IContainer`` implementations for list and dict are included in the ``nevow.accessors`` module. A common gotcha is that the closest ``IContainer`` is used to resolve data directives. This means that if a list is being used as the data during the rendering process, data directives below this will be resolved against the ``IContainer`` implementation in ``nevow.accessors.ListAccessor``. If you are expecting a data directive to invoke a Page's data\_\* method but instead get a ``KeyError``, this is why. Render directives ----------------- Render directives are almost exactly the same, except they are resolved using the closest ``IRendererFactory`` implementation in the context. Render directives can be used to allow subclasses to override certain render methods, and also can be used to allow Fragments to locate their own prefixed render methods. Flatteners ---------- .. warning:: TODO: This section isn't done yet. Nevow's flatteners use a type/function registry to determine how to render objects which Nevow encounters in the DOM during the rendering process. "Explicit is better than implicit", so in most cases, explicitly applying render methods to data will be better than registering a flattener, but in some cases it can be useful: .. code-block:: python class Person(object): def __init__(self, firstName, lastName): self.firstName = firstName self.lastName = lastName def flattenPerson(person, ctx): return flat.partialflatten(ctx, (person.firstName, " ", person.lastName)) from nevow import flat flat.registerFlattener(flattenPerson, Person) def insertData(ctx, data): return data class PersonPage(rend.Page): docFactory = loaders.stan(tags.html[insertData]) Nevow-0.14.2/doc/howto/traversal.rst0000644000175000017500000003077212652003262021325 0ustar mithrandimithrandi00000000000000Object Traversal ================ **Object traversal** is the process Nevow uses to determine what object to use to render HTML for a particular URL. When an HTTP request comes in to the web server, the object publisher splits the URL into segments, and repeatedly calls methods which consume path segments and return objects which represent that path, until all segments have been consumed. At the core, the Nevow traversal API is very simple. However, it provides some higher level functionality layered on top of this to satisfy common use cases. Object Traversal Basics ----------------------- The **root resource** is the top-level object in the URL space; it conceptually represents the URI ``/``. The Nevow **object traversal** and **object publishing** machinery uses only two methods to locate an object suitable for publishing and to generate the HTML from it; these methods are described in the interface ``nevow.inevow.IResource``: .. code-block:: python class IResource(Interface): def locateChild(self, ctx, segments): """Locate another object which can be adapted to IResource Return a tuple of resource, path segments """ def renderHTTP(self, ctx): """Render a request """ ``renderHTTP`` can be as simple as a method which simply returns a string of HTML. Let's examine what happens when object traversal occurs over a very simple root resource: .. code-block:: python from zope.interface import implements class SimpleRoot(object): implements(inevow.IResource) def locateChild(self, ctx, segments): return self, () def renderHTTP(self, ctx): return "Hello, world!" This resource, when passed as the root resource to ``appserver.NevowSite``, will immediately return itself, consuming all path segments. This means that for every URI a user visits on a web server which is serving this root resource, the text ``"Hello, world!"`` will be rendered. Let's examine the value of ``segments`` for various values of URI: - ``/`` - ``('',)`` - ``/foo/bar`` - ``('foo', 'bar')`` - ``/foo/bar/baz.html`` - ``('foo', 'bar', 'baz.html')`` - ``/foo/bar/directory/`` - ``('foo', 'bar', 'directory', '')`` So we see that Nevow does nothing more than split the URI on the string ``/`` and pass these path segments to our application for consumption. Armed with these two methods alone, we already have enough information to write applications which service any form of URL imaginable in any way we wish. However, there are some common URL handling patterns which Nevow provides higher level support for. ``locateChild`` In Depth ------------------------ One common URL handling pattern involves parents which only know about their direct children. For example, a ``Directory`` object may only know about the contents of a single directory, but if it contains other directories, it does not know about the contents of them. Let's examine a simple ``Directory`` object which can provide directory listings and serves up objects for child directories and files: .. code-block:: python from zope.interface import implements class Directory(object): implements(inevow.IResource) def __init__(self, directory): self.directory = directory def renderHTTP(self, ctx): html = ['
    '] for child in os.listdir(self.directory): fullpath = os.path.join(self.directory, child) if os.path.isdir(fullpath): child += '/' html.extend(['
  • ', child, '
  • ']) html.append('
') return ''.join(html) def locateChild(self, ctx, segments): name = segments[0] fullpath = os.path.join(self.directory, name) if not os.path.exists(fullpath): return None, () # 404 if os.path.isdir(fullpath): return Directory(fullpath), segments[1:] if os.path.isfile(fullpath): return static.File(fullpath), segments[1:] Because this implementation of ``locateChild`` only consumed one segment and returned the rest of them (``segments[1:]``), the object traversal process will continue by calling ``locateChild`` on the returned resource and passing the partially-consumed segments. In this way, a directory structure of any depth can be traversed, and directory listings or file contents can be rendered for any existing directories and files. So, let us examine what happens when the URI ``"/foo/bar/baz.html"`` is traversed, where ``"foo"`` and ``"bar"`` are directories, and ``"baz.html"`` is a file. 1. ``Directory('/').locateChild(ctx, ('foo', 'bar', 'baz.html'))`` returns ``Directory('/foo'), ('bar', 'baz.html')`` 2. ``Directory('/foo').locateChild(ctx, ('bar', 'baz.html'))`` returns ``Directory('/foo/bar'), ('baz.html, )`` 3. ``Directory('/foo/bar').locateChild(ctx, ('baz.html'))`` returns ``File('/foo/bar/baz.html'), ()`` 4. No more segments to be consumed; ``File('/foo/bar/baz.html').renderHTTP(ctx)`` is called, and the result is sent to the browser. ``childFactory`` Method ----------------------- Consuming one URI segment at a time by checking to see if a requested resource exists and returning a new object is a very common pattern. Nevow's default implementation of ``IResource``, ``nevow.rend.Page``, contains an implementation of ``locateChild`` which provides more convenient hooks for implementing object traversal. One of these hooks is ``childFactory``. Let us imagine for the sake of example that we wished to render a tree of dictionaries. Our data structure might look something like this: .. code-block:: python tree = dict( one=dict( foo=None, bar=None), two=dict( baz=dict( quux=None))) Given this data structure, the valid URIs would be: - ``/`` - ``/one`` - ``/one/foo`` - ``/one/bar`` - ``/two`` - ``/two/baz`` - ``/two/baz/quux`` Let us construct a ``rend.Page`` subclass which uses the default ``locateChild`` implementation and overrides the ``childFactory`` hook instead: .. code-block:: python class DictTree(rend.Page): def __init__(self, dataDict): self.dataDict = dataDict def renderHTTP(self, ctx): if self.dataDict is None: return "Leaf" html = ['
    '] for key in self.dataDict.keys(): html.extend(['
  • ', key, '
  • ']) html.append('
') return ''.join(html) def childFactory(self, ctx, name): if name not in self.dataDict: return rend.NotFound # 404 return DictTree(self.dataDict[name]) As you can see, the ``childFactory`` implementation is considerably shorter than the equivalent ``locateChild`` implementation would have been. ``child_*`` methods and attributes ---------------------------------- Often we may wish to have some hardcoded URLs which are not dynamically generated based on some data structure. For example, we might have an application which uses an external CSS stylesheet, an external JavaScript file, and a folder full of images. The ``rend.Page.locateChild`` implementation provides a convenient way for us to express these relationships by using child-prefixed methods: :: class Linker(rend.Page): def renderHTTP(self, ctx): return """

Start typing an animal to see the description.

You can also type in this one. It does the same thing, independently of the other one.

Nevow-0.14.2/examples/athenademo/typeahead.py0000644000175000017500000000554312611541671023130 0ustar mithrandimithrandi00000000000000# vi:ft=python from nevow import tags as T, rend, loaders, athena, url from formless import annotate, webform from twisted.python import util animals = {u'elf' : u'Pointy ears. Bad attitude regarding trees.', u'chipmunk': u'Cute. Fuzzy. Sings horribly.', u'chupacabra': u'It sucks goats.', u'ninja': u'Stealthy and invisible, and technically an animal.', } class TypeAheadPage(athena.LivePage): _tmpl = util.sibpath(__file__, "typeahead.html") docFactory = loaders.xmlfile(_tmpl) def render_typehereField(self, ctx, data): frag = TypeAheadFieldFragment() frag.page = self return frag class TypeAheadFieldFragment(athena.LiveFragment): docFactory = loaders.stan( T.span(render=T.directive('liveFragment'))[ '\n', T.input(type="text", _class="typehere"), '\n', T.h3(_class="description"), ]) def loadDescription(self, typed): if typed == u'': return None, u'--' matches = [] for key in animals: if key.startswith(typed): matches.append(key) if len(matches) == 1: return matches[0], animals[matches[0]] elif len(matches) > 1: return None, u"(Multiple found)" else: return None, u'--' athena.expose(loadDescription) class DataEntry(rend.Page): """Add Animal""" addSlash = 1 docFactory = loaders.stan( T.html[T.body[T.h1[ "First, a Setup Form."], T.h2["Enter some animals as data. Click 'Done' to test looking up these animals."], T.h3["The neat stuff happens when you hit 'Done'."], webform.renderForms(), T.ol(data=T.directive("animals"), render=rend.sequence)[ T.li(pattern="item", render=T.directive("string")), ], T.h1[T.a(href=url.here.child('typeahead'))["Done"]], ] ] ) def bind_animals(self, ctx, ): """Add Animal""" return annotate.MethodBinding( 'animals', annotate.Method(arguments= [annotate.Argument('animal', annotate.String()), annotate.Argument('description', annotate.Text())]), action="Add Animal", ) def animals(self, animal, description): """Add Animal""" if not (animal and description): return animals[animal.decode('utf-8')] = description.decode('utf-8') return url.here def data_animals(self, ctx, data): return animals.keys() def child_typeahead(self, ctx): return TypeAheadPage(None, None) Nevow-0.14.2/examples/athenademo/widgets.js0000644000175000017500000000116612611541671022613 0ustar mithrandimithrandi00000000000000 // import Nevow.Athena WidgetDemo.Clock = Nevow.Athena.Widget.subclass('WidgetDemo.Clock'); WidgetDemo.Clock.methods( function start(self, node, event) { self.callRemote('start'); return false; }, function stop(self, node, event) { self.callRemote('stop'); return false; }, function setTime(self, toWhat) { Divmod.debug("clock", "Setting time " + toWhat); var time = Nevow.Athena.NodeByAttribute(self.node, "class", "clock-time"); Divmod.debug("clock", "On " + time); time.innerHTML = toWhat; Divmod.debug("clock", "Hooray"); }); Nevow-0.14.2/examples/athenademo/widgets.py0000644000175000017500000000452312611541671022627 0ustar mithrandimithrandi00000000000000 import time, os from twisted.internet import task from twisted.python import log, util from nevow import athena, loaders, static class Clock(athena.LiveFragment): jsClass = u"WidgetDemo.Clock" docFactory = loaders.xmlstr('''\
''') running = False def start(self): if self.running: return self.loop = task.LoopingCall(self.updateTime) self.loop.start(1) self.running = True athena.expose(start) def stop(self): if not self.running: return self.loop.stop() self.running = False athena.expose(stop) def _oops(self, err): log.err(err) if self.running: self.loop.stop() self.running = False def updateTime(self): self.callRemote('setTime', unicode(time.ctime(), 'ascii')).addErrback(self._oops) class WidgetPage(athena.LivePage): docFactory = loaders.xmlstr("""\
First Clock
Second Clock
""") addSlash = True def __init__(self, *a, **kw): super(WidgetPage, self).__init__(*a, **kw) self.jsModules.mapping[u'WidgetDemo'] = util.sibpath(__file__, 'widgets.js') def childFactory(self, ctx, name): ch = super(WidgetPage, self).childFactory(ctx, name) if ch is None: p = util.sibpath(__file__, name) if os.path.exists(p): ch = static.File(file(p)) return ch def render_clock(self, ctx, data): c = Clock() c.page = self return ctx.tag[c] def render_debug(self, ctx, data): f = athena.IntrospectionFragment() f.setFragmentParent(self) return ctx.tag[f] Nevow-0.14.2/examples/blogengine/0000755000175000017500000000000012761123542020606 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/blogengine/images/0000755000175000017500000000000012761123542022053 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/blogengine/images/bg-header2.jpg0000644000175000017500000001645412611541671024470 0ustar mithrandimithrandi00000000000000JFIFC     C   " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?E((((((((((((((((((((((((((((((((((((((((((((((((((>!|jG¸smܶzsWN`T(ԒK诏|_#E jz+mJ7ǘߘZMS QI-Z}o=vfKoVx-/?Ch(?Ut 4}mn~yBq:K&|IdX諨є8-^y_:x]' ^7p~>Gﭵk|W}˺;iDH=C.AփGaj&BQ\`QEQEQEQEQEQEQEQEQEV7axzֽA閫.&l/=?"h |}=~}7vYǟShaңo[u^[T'}|oRʵ_g{,Hm|-|yyqw-Jۤv.OrO&xwz{m'EQ.[[.c_q|yX[H{룆ӥ) {I2jTտ?4,?^zE_y𝆝u]-}Ƞk4ٟ➼[kSomþtK ׺Y@nv#>淫IJmTSC u;/#Z[*)avBk7Ox.&\𮳥[Y$H6=Ec%M5o>5U~v~Wmjk{f};snvyߌWWH}CiƧSvի߱ߊ ,T~Ob[qM?ݯfL{7٧#屙;+~ޛKou>m|^Cג/T-&= uem0ec]n~:x؋K'l4p!CsLا_ Uxa.}EWƟQ@Q@Q@Q@Q@Q@Q@Gss" J]F¨I+o om->+S&encO}]X\3Ŷ^l٩^_H粨\ޯԯ}πԵKm.֣YYk-ӫXE,MkWS [>uv_:w>i-/oՙ~yW[cg 3_jaѯߑmHݘo/t9n;0v?|Fͧ*җ?EfXL(F:HW?Yɟ?ď {NVNH³>?gLm#K7uwmp^6V +,~W[/_Uhog43; KtCKo>? Cij]^Ȼ}Ъx27^z RZc)`(}[I,K*:F˵`m/wۥψvu]@lmg$Gnzvʫ)! ~u{>wl]eFQqGx>["/ºl~Wۏk$e[>^;y,puhv^]X~ş[[s]|W7K#|זuee*^DOKդ[tG#?)a_i=Oմ{tzI#^wXJ׻/GpfwJe?їh낊(((((('lĮZT[/Du V禮qV.1I}/s_+hwqnfwm~Wߵ~7G|9$~*xcrg?Y..z&~ڦ}7`jiQWqw}]g¨}?yɷXm4۱(k_/5u?$I[+}JQ r0e*_{neA˝6։4N/9Rzi cֽ%-`ܟ*j+U%FjCt~^qJ{I5UmW=t|ۭC~? _px;4Xʷ.E':VjE-2NurUt?! */T~E(QEQEQEQEQEQE|U_QȚ==~-헍|i{`+۞_{ܪ~a)Jh9}ۤ_>̏ 'V,t :{N >%Ecՙ|Ve:˳6;0/1"]^hQF ksԌN_9\rRCDv?~jWv~:Ă(m-Y$cUPbOA]~ i:ƇXV]L0F GY:7l[uk\>tZ% 6y&t^x*.6۳/ܢ+Ϫ ( jz5CurEnr5_I~ G_ 󧙵[%D _ia^3)neX , ]v}Y\784^u)YpM4Ac8uПV/vL.'-- ?%~ٖs'2{yGV?(mHRiYdZ? +Uw 6#yc.E[r=y4'_u]hr~Wyxe/?Y5EWEPEPEPEPEPEP_ Ԧ%Ɍ(T~{EG-cDaWlnb!'ʾ %i~+S⸫ `Yo=N&xRyjv$GI+"~Qu][.ȣC˹~xz_?^"5u3s[<z!ºu!m-W8Sg?$==Okoxige Bi[t[jsbOξwiwxO3u)u8שE~uIœ/5(\%>χnHeD,5 8<仭OpEZ?O{Ag:ӝ+~Jט BX;gYKv9\]WhRs_W5Wh SxGqe٦v{*/.DռS~S]}/[hr^X fk].)oow7f|/վ/M֑y-{KXߕy^]~Gyk<ެpd/>r|>H6p9W+5No#BE i𮕠i1yvn/|(}I}?(OƤ<3iMQۘ?Dj;ͳ 6}p}{Y]ۉnfo;fM}{k%? zDS*5DQ=īJWqbz+a'<6ʫyzW|~Lp=sTVv-Y/#^DgEQEQEQEQEQEQEW}?zonmr˟μ'z+9)٭Ӎh:sWOF~%xCk6gLO П<>m3n󛟰Nx?H_-%Wl!%!_>w,Oo+E*R#teTCZsq]G_8Ʃz}Ѯyu2K +W;q=犾٬.e+)Z߶^e1ڗþ$Inߚ?=cck[^:= -cúa/l?a[_:X̎BK.hY'u(ةUjKNJ|;gL.z P5:6Vy7Gxi>KxKR^E~˺ok2cAAw-S鷾#~dmfzC|C[oZ\-MIEz_<]Y[/ -)eW/A e 5"{:(eIҴ- OOOvmm(ǠU?k_ ^^Td޳OY+7J-Gߑ,AqIwN=Oe5:ۢt\~?+s>/|}}K^jw4Jާ]'_⛭Wy{? ƿ£]oGֶbKErZCYwn4.fGyl4#]_G_~9_jֿ!&VW\_u_i|+wD6c5{I,,uwQ?MreIk'~ ( ( ( ( ( ( ( ( >,y$nܗPQ]XlM\%EVŋRtkGW|)'[ѵ:Kl)pj߂}?Z~nkYqE~|O5W|OE{X.丷tr>+NKu^_Raotտ쯾lL=#}oי71)L#I^C< Fv+7V2I 2 ^ţE_M'mϡY3W.3K"մ;ڻCHC⫢Y6_\V 9!Or%?Ng'<~oy+ĿR ZꚄݛS+TaϺakmggqyp"*c`aeˊ3*&_?m_"=J/ nMjbKpT^f^~*xh|3.f*yZ^ CA>agʱSzO4eO-szuS_,7IW:|§c㣽~|2_~<;bHq&0e5;Nevow-0.14.2/examples/blogengine/images/top.gif0000644000175000017500000000025612611541671023350 0ustar mithrandimithrandi00000000000000GIF89a3"zwUfDpf!,[Iەr$%(kZJsS2x,dX `AaEh@6;Tx5[a85-o ~>5;Nevow-0.14.2/examples/blogengine/styles/0000755000175000017500000000000012761123542022131 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/blogengine/styles/form.css0000644000175000017500000000235712611541671023616 0ustar mithrandimithrandi00000000000000form { margin: 0; } /* form div { margin-top: 10px; } */ form .field { margin-top: 10px; } fieldset { margin: 0; margin-top: 10px; /*border: 1px solid red;*/ border-style: none; padding: 0; } label { display: block; margin-bottom: 2px; } label span { font-size: 85%; color: #666; } input, textarea { /* f a t font to ease input */ font: bold 12px/100% "Lucida Console", Curier, monospace; color: #444; padding: 4px 2px; border: 1px solid #ccc; margin: 0; } input:focus, textarea:focus { border-color: #6cc; } input.btn { margin: 0; margin-right: 2px; /* space between the next button */ padding: 2px 4px; color: #333; background: #6cc; /* raised 3d look */ border-top: 2px solid #ccc; border-left: 2px solid #ccc; border-bottom: 2px solid #444; border-right: 2px solid #444; font-family: Verdana, Helvetica, sans-serif; line-height: 150%; font-size: xx-small; /* fake value for IE4/5.x */ voice-family: "\"}\""; voice-family: inherit; font-size: x-small; /* real inteded value for text size */ } blah { /* fake rule for IE */ } Nevow-0.14.2/examples/blogengine/styles/site.css0000644000175000017500000001525712611541671023622 0ustar mithrandimithrandi00000000000000@import url("typo.css"); @import url("form.css"); /* ------------------------------------------------- Theme by Andrea Peltrin (http://www.deelan.com) ------------------------------------------------- */ /* basic elements */ /*---------------------------------------------------*/ body, html { margin: 0; padding: 0; } body { color: #222; margin: 0; /* background: #903 url("images/background.gif"); */ background: #fafafa; } body, p, li, td, th, dd, dt, h1, h2, h3, h4, h5, h6 /* help browser to not forget */ { font-family: verdana, geneva, arial, sans-serif; /* line-height: 200%;*/ font-size: x-small; /* IE5 */ voice-family: "\"}\""; voice-family: inherit; font-size: small; } html>body { font-size: small; } a img { border-style: none; } /* main contents */ #main { /*border: 1px solid red; */ /* debug */ /*border-top: none;*/ margin: 0 auto; padding: 0; position: absolute; top: 30px; left: 50%; margin-left: -380px; width: 760px; } /* header */ #header { background: #069 url("/images/bg-header2.jpg") top right no-repeat; height: 235px; border: 1px solid #ccc; } #header h1 { margin: 0; margin-top: 140px; /*margin-right: 280px;*/ padding: 0; padding-left:30px; font: bold italic 52px/100% georgia, times, serif; color: #fff; } #header p { margin: 0; /*margin-left: 280px;*/ /* == #header h1 */ padding: 0; padding-left:30px; text-transform: lowercase; font: bold 18px/100% verdana, arial, sans-serif; color: #fff; } /*---------------------------------------------------*/ #content{ padding: 35px; margin: 0; /*border: 1px solid red; */ /* debug */ margin-right: 245px; } #content p { /* border: 1px solid red; */ /* debug */ /* text-align: justify;*/ line-height: 160%; margin: 1em 0; padding: 0; } #content ul, #content ol, #content dl, #content blockquote { line-height: 160%; } #content dd { margin: 0; margin-bottom: 10px; } /* funky titles */ #content h2 { /* font: bold italic 24px/100% georgia, times, serif;*/ font: bold 18px/100% verdana, arial, sans-serif; color: #069; margin: 0; margin-bottom: 4px; /* space up for datetime */ text-transform: lowercase; /* font-variant: small-caps;*/ } #content p.dtm { margin: 0; margin-bottom: 1em; font-size: 80%; text-transform: uppercase; } div.entry { } #content hr { visibility: hidden; padding: 0; margin: 2.5em auto; } /* ...and finally we place the list of links */ #sidebar{ float: right; /* border: 1px solid #069;*/ margin: 0; padding: 35px; width: 250px; voice-family: "\"}\""; voice-family: inherit; width: 180px; } #main>#sidebar { width: 180px; } #sidebar ul { list-style: none; margin: 0; margin-bottom: 25px; padding: 0; } #sidebar ul li { line-height: 150%; margin: 0; padding: 5px 0; } #sidebar ul#nav li { line-height: 160%; /* restore global value */ border-style: none; background: none; margin-bottom: 10px; padding: 5px 0 5px 22px; /* space for arrow gfx */ border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; text-transform: lowercase; } /* funky titles */ #sidebar h3 { color: #069; margin: 0; margin-bottom: 15px; padding: 0; } /* styles for in-line images/photos */ /*---------------------------------------------------*/ #content .image img { display: block; border: 1px solid #444; } #content .image { margin: 1em auto; /* == #content p*/ width: 360px; position: relative; } #content .image span { position: absolute; background: #069; color: #fff; padding: 4px 4px; bottom: 10px; left: 10px; z-index: 1; /* verdana looks better than arial if font is small */ font-family: verdana, arial, helvetica, sans-serif; /* @@ fix IE5 here */ font-size: x-small; } /* hyperlink */ /*---------------------------------------------------*/ a:link, a:visited, a:hover, a:active { color: #099; text-decoration: none; border-bottom: 1px solid #099; } a:visited { color: #444; border-bottom-color: #444; } a:hover { color: #903; /*border-bottom: 1px solid #903;*/ border-bottom: none; } #footer { margin: 0; margin-top: 20px; padding: 15px 0; /* background: #903;*/ clear: both; /* float reset */ text-align: center; border-top: 1px solid #ccc; font-size: 85%; } /* utilities */ /*---------------------------------------------------*/ .cut {clear: both; height: 1px;} .hidden {display: none;} /*---------------------------------------------------*/ ul#breadcrumb { list-style: none; /* reset both on Mozilla and IE */ padding: 0; margin: 0; margin-bottom: 35px; } ul#breadcrumb li { display: inline; margin-right: 5px; /*text-transform: lowercase;*/ } ul#breadcrumb li:last-child { font-weight: bold; } /* #searchBtn { margin-left: 5px; } */ /* -------------------------------------------------- */ .photo { float: left; margin: 5px 0; margin-right: 10px; padding: 0; } .photo a:link, .photo a:visited { border: 1px solid #0099CC; display: block; } .photo a:link:hover, .photo a:visited:hover { border: 1px solid #903; } .photo img { display: block; margin:0; padding: 5px; background: #fff; } .transport { width: auto; /*border: 2px solid #069;*/ text-align: center; padding: 5px 0; } #alert { background: #069; color: white; font-weight: bold; margin-bottom: 20px; } #alert ul { list-style: none; padding: 0; margin: 0; } #alert ul li { margin: 5px 10px; } /* @@ fix, it's ugly looking */ .comment:target { border: 1px solid #099; } #moblog{ text-align: center; background: #ddd; border: 1px solid #999999; padding: 5px; } #moblog { margin: 5px 0; padding: 10px; } #moblog a:link, #moblog a:visited { border: 1px solid #0099CC; display: block; width: 85px; margin: 5px auto; } #moblog a:link:hover, #moblog a:visited:hover { border: 1px solid #903; } #moblog img { display: block; margin:0; padding: 5px; background: #fff; } #moblog p { padding: 0; margin: 0; text-align: center; } Nevow-0.14.2/examples/blogengine/styles/typo.css0000644000175000017500000000254412611541671023644 0ustar mithrandimithrandi00000000000000/* -------------------- definition list ---------------------*/ dl { } dd { margin-left: 1em; } dt { } /* -------------------- phrase elements ---------------------*/ abbr, acronym { cursor: help; border-bottom: dotted 1px; } ins, del { } ins { text-decoration: none; /* some UAs reder as underlined, hence reset */ } ins:before { /* content: '[' */ } ins:after { /* content: ']' */ } /* -------------------- block/inline quotations, check: http://diveintomark.org/archives/2002/05/04/the_q_tag.html ---------------------*/ blockquote { border-left: 4px double #6cc; padding: 0; padding-left: 10px; margin: 0.5em 5%; } cite, q { font-style: italic; } p>q, li>q, p>cite, li>cite { /* reset for mozilla, opera */ font-style: normal; } cite, q { quotes: '\201C' '\201D' '\2018' '\2019'; /* quote and quote within quote */ } cite:before, q:before { content: open-quote; } cite:after, q:after { content: close-quote; } /* -------------------- geeks' markup codes ---------------------*/ pre, code { font-size: 100%; /* reset size for IE */ } #content>pre { width: auto; /* reset value for moz, opera */ } /* mostly used to indicate markup/language keywords*/ code { color: #6cc; font-weight: bold; } Nevow-0.14.2/examples/blogengine/atom.xml0000644000175000017500000000222412611541671022271 0ustar mithrandimithrandi00000000000000 Subbacultcha Subbacultcha atom Page modified tag:localhost,2004:/ <n:slot name="title">Entry Title</n:slot> tag:localhost,2004:/id Date created Date modified Author Content Nevow-0.14.2/examples/blogengine/axiomstore.py0000644000175000017500000000454012611541671023356 0ustar mithrandimithrandi00000000000000from iblogengine import IBlog from zope.interface import implements from axiom import item, store, attributes, sequence from epsilon.extime import Time class Post(item.Item): typeName = "BlogenginePost" schemaVersion = 1 id = attributes.integer(indexed=True, allowNone=False) created = attributes.timestamp(indexed=True) modified = attributes.timestamp(indexed=True) title = attributes.text(indexed=True, allowNone=False) author = attributes.text(indexed=True, allowNone=False) category = attributes.text(indexed=True) content = attributes.text(indexed=True) def __init__(self, **kw): now = Time() kw.update({'created':now, 'modified':now}) super(Post, self).__init__(**kw) def setModified(self): self.modified = Time() class Blog(item.Item, item.InstallableMixin): implements(IBlog) typeName = "BlogengineBlog" schemaVersion = 1 posts = attributes.reference() next_id = attributes.integer(default=0) def __init__(self, **kw): super(Blog, self).__init__(**kw) self.posts = sequence.List(store=self.store) post = Post(store=self.store, id=self.getNextId(), author=u'mike', title=u'FIRST POST!!!!', category=u'Test', content=u'I guess it worked.') self.addNewPost(post) def installOn(self, other): super(Blog, self).installOn(other) other.powerUp(self, IBlog) def addNewPost(self, post): # Why even let posts manage their own ids? Oh well. assert post.id == self.next_id,\ "Bad post ID; is %r, should be %r" % (post.id, self.next_id) self.posts.append(post) self.next_id += 1 def getPosts(self, how_many = None): """Return the latest 'how_many' posts, in reverse database order. XXX Really, it should be based on modtime. Which is broken. """ if how_many is None or how_many > self.next_id: how_many = self.next_id return (self.getOne(self.next_id-id-1) for id in range(how_many)) def getOne(self, id): return self.posts[id] def getNextId(self): return self.next_id def initialize(storename): s = store.Store(storename) s.findOrCreate(Blog).installOn(s) return s Nevow-0.14.2/examples/blogengine/blogengine.tac0000644000175000017500000000073712611541671023420 0ustar mithrandimithrandi00000000000000from twisted.application import service, strports from nevow import appserver import frontend, axiomstore as store, iblogengine from smtpserver import BlogSMTPFactory application = service.Application('blogengine') db = store.initialize('db.axiom') site = appserver.NevowSite(resource = frontend.UI()) site.remember(db, iblogengine.IStore) strports.service("8080", site).setServiceParent(application) strports.service("2500", BlogSMTPFactory(db)).setServiceParent(application) Nevow-0.14.2/examples/blogengine/email_client.py0000644000175000017500000000053512611541671023611 0ustar mithrandimithrandi00000000000000import sys, smtplib fromaddr = raw_input("From: ") toaddrs = raw_input("To: ").split(',') print "Enter message, end with ^D:" msg = '' while 1: line = sys.stdin.readline() if not line: break msg = msg + line # The actual mail send server = smtplib.SMTP('localhost', 2500) server.sendmail(fromaddr, toaddrs, msg) server.quit() Nevow-0.14.2/examples/blogengine/frontend.py0000644000175000017500000002050012611541671022775 0ustar mithrandimithrandi00000000000000from time import time as now from zope.interface import implements, Interface from twisted.web import xmlrpc from twisted.python.components import registerAdapter from nevow import rend, loaders, url, static from nevow import tags as t, inevow from formless import annotate, iformless, webform from axiomstore import Post from iblogengine import IStore, IBlog def pptime(tt): return tt.asHumanly()+" UTC" def atompptime(tt): return tt.asISO8601TimeAndDate() class ITimer(Interface): pass ##################################### categories = ['Programming', 'Test', 'Sport', 'People', 'Python', 'Databases', 'bench', 'woo', 'Friends'] class IInsert(annotate.TypedInterface): def insert( ctx = annotate.Context(), title = annotate.String(strip=True, required=True, \ requiredFailMessage="Title must be provided", tabindex='1'), author = annotate.String(strip=True, default="Anonymous", tabindex='2'), id = annotate.String(hidden=True), category = annotate.Choice(categories, tabindex='3'), content = annotate.Text(required=True, \ requiredFailMessage="Posts with no content are not allowed", tabindex='4'), ): pass insert = annotate.autocallable(insert) ##################################### class BaseUI(rend.Page): addSlash = True def renderHTTP(self, ctx): return IStore(ctx).transact(rend.Page.renderHTTP, self, ctx) def locateChild(self, ctx, segments): return IStore(ctx).transact(rend.Page.locateChild, self, ctx, segments) ############################# class UI(BaseUI): docFactory = loaders.xmlfile ('ui.html') child_styles = static.File('styles') child_images = static.File('images') child_webform_css = webform.defaultCSS def render_starttimer(self, ctx, data): ctx.remember(now(), ITimer) return ctx.tag def render_stoptimer(self, ctx, data): start = ITimer(ctx) return ctx.tag['%s' % (now()-start)] def render_needForms(self, ctx, data): action = ctx.arg('action', 'view') if action == 'edit': form = inevow.IQ(ctx).onePattern('frm') return ctx.tag[form] return ctx.tag.clear() def data_getEntries(self, ctx, data): num = ctx.arg('num', '60') return IBlog(IStore(ctx)).getPosts(int(num)) def render_entries(self, ctx, data): ctx.tag.fillSlots('modification', pptime(data.modified)) ctx.tag.fillSlots('category', data.category) ctx.tag.fillSlots('author', data.author) ctx.tag.fillSlots('title', data.title) ctx.tag.fillSlots('content', data.content) ctx.tag.fillSlots('permaLink', url.root.child('%s' % (data.id))) return ctx.tag def render_insert(self, ctx, data): return ctx.tag def render_editer(self, ctx, data): ctx.tag.fillSlots('editPost', url.root.child('%s' % (data.id) ).add('action','edit')) return ctx.tag def render_insert(self, ctx, data): ctx.tag.fillSlots('insert', url.root.child('insertEntry')) return ctx.tag def child_insertEntry(self, ctx): return NewEntry() def childFactory(self, ctx, segment): id = segment.isdigit() and segment or '-1' if int(id) >= 0: return IBlog(IStore(ctx)).getOne(int(id)) elif segment == 'rpc2': return BlogRPC(IStore(ctx)) elif segment == 'atom.xml': return Atom() def child_thx(self, ctx): return Thx() ################################## class NewEntry(BaseUI): implements(IInsert) docFactory = loaders.stan( t.html[ t.head[ t.title['Insertion form'], t.link(rel='stylesheet', type='text/css', href=url.root.child('webform_css')), ], t.body[ t.h1['Insertion'], t.invisible(render=t.directive("forms")) ] ]) def render_forms(self, ctx, data): d = iformless.IFormDefaults(ctx).getAllDefaults('insert') d['author'] = 'Anonymous' d['id'] = IBlog(IStore(ctx)).getNextId() return webform.renderForms() def insert(self, ctx, id, title, author, category, content): newPost = Post(store=IStore(ctx), id=int(id), author=unicode(author), title=unicode(title), category=unicode(category), content=unicode(content)) IBlog(IStore(ctx)).addNewPost(newPost) inevow.IRequest(ctx).setComponent(iformless.IRedirectAfterPost, '/thx') ##################################### class Thx(rend.Page): docFactory = loaders.stan( t.html[ t.body[ t.h1['Succeeded'], t.a(href=url.root)["Back to main"] ] ]) #################################### class Entry(UI): implements(IInsert) def data_getEntries(self, ctx, data): return [data] def render_forms(self, ctx, data): d = iformless.IFormDefaults(ctx).getAllDefaults('insert') d['author'] = self.original.author d['category'] = self.original.category d['title'] = self.original.title d['content'] = self.original.content d['id'] = self.original.id return webform.renderForms() def insert(self, ctx, id, title, author, category, content): self.original.author = unicode(author) self.original.title = unicode(title) self.original.category = unicode(category) self.original.content = unicode(content) inevow.IRequest(ctx).setComponent(iformless.IRedirectAfterPost, '/thx') ##################################### class Atom(BaseUI): docFactory = loaders.xmlfile('atom.xml') def beforeRender(self, ctx): inevow.IRequest(ctx).setHeader("Content-Type", "application/application+xml; charset=UTF-8") def data_getFirstPost(self, ctx, data): for post in IBlog(IStore(ctx)).getPosts(1): return post def render_modified(self, ctx, data): return ctx.tag.clear()[atompptime(data.modified)] def data_get_posts(self, ctx, data): return IBlog(IStore(ctx)).getPosts(15) def render_post(self, ctx, data): #id = data.poolToUID[IBlog(IStore(ctx)).postsPool] # mkp: ...I don't know what that means or what it's for. ctx.tag.fillSlots('title', data.title) ctx.tag.fillSlots('link', url.root.child(data.id)) ctx.tag.fillSlots('id', data.id) ctx.tag.fillSlots('created', atompptime(data.created)) ctx.tag.fillSlots('modified', atompptime(data.modified)) ctx.tag.fillSlots('author', data.author) ctx.tag.fillSlots('content', data.content) return ctx.tag ##################################### from axiom.item import transacted class BlogRPC(xmlrpc.XMLRPC): """Publishes stuff""" def __init__(self, store): xmlrpc.XMLRPC.__init__(self) self.store = store def xmlrpc_publish(self, author, title, category, content): newid = IBlog(self.store).getNextId() newPost = Post(store=self.store, id=newid, author=unicode(author), title=unicode(title), category=unicode(category), content=unicode(content)) IBlog(self.store).addNewPost(newPost) return 'Successfully added post number %s' % newid xmlrpc_publish = transacted(xmlrpc_publish) def xmlrpc_edit(self, id, author, title, category, content): post = IBlog(self.store).getOne(id) post.author = author post.title = title post.category = category post.content = content post.setModified() return 'Successfully modified post number %s' % id xmlrpc_edit = transacted(xmlrpc_edit) def xmlrpc_entries(self, count): return [(entry.id, entry.author, entry.category, entry.title, entry.content) \ for entry in IBlog(self.store).getPosts(count)] xmlrpc_entries = transacted(xmlrpc_entries) registerAdapter(Entry, Post, inevow.IResource) Nevow-0.14.2/examples/blogengine/iblogengine.py0000644000175000017500000000111212611541671023436 0ustar mithrandimithrandi00000000000000from zope.interface import Interface class IStore(Interface): """ Interface used to remember the store in the site object """ class IBlog(Interface): """ Represents the Blog Powerup in the Store """ def addNewPost(post): """ Add the user provided post instance to the blog """ def getPosts(how_many = None): """ Get the last X posts, if how_many is not specified, gets all of them """ def getOne(id): """ Get the post with the corresponding id from the store """ def getNextId(): """ Get the next free id in the store """ Nevow-0.14.2/examples/blogengine/smtpserver.py0000644000175000017500000001070612611541671023377 0ustar mithrandimithrandi00000000000000 # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ A toy email server. """ from zope.interface import implements from twisted.internet import defer from twisted.mail import smtp from axiom.item import transacted from axiomstore import Post from iblogengine import IBlog # You need to set this to your real SMTP_HOST SMTP_HOST = 'localhost' FROM = 'user@localhost' __doc__ = """ This is the mail message format to post something via mail, no special order is required, but all those fields must be present: ====== [Id: ID] Author: AUTHOR_NAME Category: CATEGORY_NAME Title: TITLE Content: CONTENT """ class BlogMessageDelivery: implements(smtp.IMessageDelivery) def __init__(self, store): self.store = store def receivedHeader(self, helo, origin, recipients): return recipients def validateFrom(self, helo, origin): # All addresses are accepted return origin def validateTo(self, user): # Only messages directed to the "console" user are accepted. if user.dest.local == "blog": return lambda: BlogMessage(self.store) raise smtp.SMTPBadRcpt(user) class BlogMessage: implements(smtp.IMessage) def __init__(self, store): self.lines = [] self.store = store def lineReceived(self, line): self.lines.append(line) def eomReceived(self): post = {} isContent = False ctnt_buff = [] recipients = self.lines[0] addrs = [] for recipient in recipients: if '@' not in recipient.orig.addrstr: # Avoid answering to bounches if not recipient.orig.addrstr == '<>': addrs.append(recipient.orig.addrstr[:-1]+'@'+recipient.orig.domain+'>') else: # Avoid answering to bounches if not recipient.orig.addrstr == '<#@[]>': addrs.append(recipient.orig.addrstr) for line in self.lines[1:]: if not isContent: try: field, value = line.split(':', 1) except ValueError: continue if field.lower() != 'content': post[field.lower()] = value.strip() else: isContent = True ctnt_buff.append(value.strip()) else: ctnt_buff.append(line.strip()) post['content'] = '\n'.join(ctnt_buff) for header in 'content author category title'.split(): if not post.has_key(header): self.lines = [] return defer.fail(None) if post.has_key('id'): oldpost = IBlog(self.store).getOne(int(post['id'])) oldpost.author = unicode(post['author']) oldpost.title = unicode(post['title']) oldpost.category = unicode(post['category']) oldpost.content = unicode(post['content']) oldpost.setModified() action = 'modified' id = post['id'] else: newid = IBlog(self.store).getNextId() newPost = Post(store=self.store, id=newid, author=unicode(post['author']), title=unicode(post['title']), category=unicode(post['category']), content=unicode(post['content'])) IBlog(self.store).addNewPost(newPost) action = 'added' id = newid self.lines = [] msg = """From: <%s> Subject: Successfull Post Post number %s successfully %s """ % (FROM, id, action) return self.sendNotify(addrs, msg) eomReceived = transacted(eomReceived) def toLog(self, what): print what def sendNotify(self, to_addr, msg): d = smtp.sendmail(SMTP_HOST, FROM, to_addr, msg) d.addCallback(self.toLog) d.addErrback(self.toLog) return d def connectionLost(self): # There was an error, throw away the stored lines self.lines = None class BlogSMTPFactory(smtp.SMTPFactory): def __init__(self, store, *a, **kw): smtp.SMTPFactory.__init__(self, *a, **kw) self.delivery = BlogMessageDelivery(store) def buildProtocol(self, addr): p = smtp.SMTPFactory.buildProtocol(self, addr) p.delivery = self.delivery return p Nevow-0.14.2/examples/blogengine/ui.html0000644000175000017500000000543212611541671022116 0ustar mithrandimithrandi00000000000000 Subbacultcha

PermaLink Edit

Posted by on , filed under

Edit Entry

Nevow-0.14.2/examples/cal/0000755000175000017500000000000012761123542017234 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/cal/__init__.py0000644000175000017500000000000012611541671021334 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/cal/cal.py0000644000175000017500000000175612611541671020357 0ustar mithrandimithrandi00000000000000from nevow import rend, loaders, tags as t from nevow.taglibrary import cal class Calendar(rend.Page): addSlash = True year = None month = None def __init__(self, year=None, month=None): if year is not None and month is not None: self.year = year self.month = month def locateChild(self, ctx, segments): if len(segments) >= 2: year, month = segments[:2] return Calendar(int(year), int(month)), segments[2:] return super(Calendar, self).locateChild(ctx, segments) def data_date(self, ctx, data): if self.year is None or self.month is None: return None return int(self.year), int(self.month) docFactory = loaders.stan( t.html[ t.head[ t.title["Calendar Example"], cal.calendarCSS ], t.body[ t.invisible(data=t.directive('date'), render=cal.cal) ] ] ) Nevow-0.14.2/examples/canvas/0000755000175000017500000000000012761123542017750 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/canvas/__init__.py0000644000175000017500000000000012611541671022050 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/canvas/canvas.py0000644000175000017500000001336112611541671021602 0ustar mithrandimithrandi00000000000000import os, string, random from twisted.internet import task from nevow import canvas, rend DEBUG = False try: words = open('/usr/share/dict/words').readlines() except: words = open(os.path.join('.','files','words')).readlines() ## Some random helpers rndpt = lambda w, h: (random.randint(-w/2, w/2), random.randint(-h/2, h/2)) rndrct = lambda w, h: rndpt(w, h) + rndpt(w, h) rndtxt = lambda: ''.join([random.choice(string.letters) for x in range(random.randint(5, 10))]) rndp = lambda: (random.randint(0, 100), )*2 mv = lambda: random.choice( [1, -1, 2, -2, 3, -3, 4, -4, 5, -5] ) class Looper(object): def __init__(self, canvas): self.canvas = canvas self.stride = mv() self.looper = task.LoopingCall(self.loop) self.looper.start(0.25) def loop(self): if self.canvas.closed: self.looper.stop() else: self.perform() class Textorizer(Looper): firstTime = True def __init__(self, T, w, h): self.T = T self.w = w self.h = h self.hstride = mv() Looper.__init__(self, T.canvas) def perform(self): T = self.T if not self.firstTime: hw = self.w/2 hh = self.h/2 if T.x < -hw or T.x+400>hw: self.hstride = -self.hstride if T.y < -hh or T.y+100>hh: self.stride = -self.stride T.move(T.x+self.hstride, T.y+self.stride) else: self.firstTime = False T.size(random.randint(9, 48)) T.listFonts().addCallback(lambda fnts: T.font(random.choice(fnts))) class Rotatorizer(Looper): angle = 0 def perform(self): self.canvas.rotate(self.angle) self.angle += self.stride class Alphaerizer(Looper): def __init__(self, canvas): canvas.alpha(random.randint(0, 100)) Looper.__init__(self, canvas) def perform(self): self.canvas.alpha(self.canvas._alpha+self.stride) if self.canvas._alpha < 0 or self.canvas._alpha > 100: self.stride = -self.stride class CanvasDemo(canvas.Canvas): def onload(self, canvas): """Demo of drawing with a CanvasSocket object. """ ## Create a bunch of groups for x in xrange(random.randint(5, 15)): newGroup = canvas.group() if random.choice([True, False]): Alphaerizer(newGroup) self.manipulateACanvas(newGroup) else: newGroup.pen(2, 0, 100) newGroup.reposition(*rndpt(self.width, self.height)) newGroup.move(-25, -25) newGroup.line(25, 25) newGroup.move(-25, 25) newGroup.line(25, -25) Rotatorizer(newGroup) def manipulateACanvas(self, canvas): canvas.reposition(*rndpt(self.width, self.height)) canvas.S = S = canvas.sound('http://localhost/amen.mp3') S.play(timesLoop=5) for x in range(random.randint(1, 4)): canvas.pen( random.randint(1, 10), random.randint(0, 0xffffff), random.randint(0, 100)) canvas.move(*rndpt(self.width, self.height)) choice = random.randint(0, 4) if choice == 0: canvas.line(*rndpt(self.width, self.height)) elif choice == 1: canvas.fill(random.randint(0, 0xffffff), random.randint(0, 100)) for x in range(random.randint(3, 20)): if random.randint(0, 1): canvas.line(*rndpt(self.width, self.height)) else: canvas.curve(*rndrct(self.width, self.height)) canvas.close() elif choice == 2: canvas.curve(*rndrct(self.width, self.height)) elif choice == 3: T = canvas.text(random.choice(self.original), *(0,0,400,100)) # This is an example of how you can hold on to drawing objects and continue to # draw on them later, because the CanvasSocket holds itself open until done() is called Textorizer(T, self.width, self.height) else: # This demo requires a folder of images which I don't want to put in # the nevow source. Hooking this up is left as an exercise for the reader. continue imgname = random.choice(os.listdir("flsh/images")) I = canvas.image('/images/%s' % imgname) I.scale(*rndp()) I.alpha(random.randint(0, 100)) rotate = random.randint(-180, 180) I.rotate(rotate) I.move(*rndpt(self.width, self.height)) # See above comment #from nevow import static #child_images = static.File('images') def onMouseDown(self, canvas, x, y): canvas.x = x canvas.y = y canvas.pen(10, 0xDF34AB, 50) canvas.move(x-25, y-25) canvas.line(x+25, y+25) canvas.move(x+25, y-25) canvas.line(x-25, y+25) #canvas.S.play() def onKeyDown(self, canvas, key): if hasattr(canvas, 'x'): T = canvas.text(key, canvas.x, canvas.y, 200, 200) T.size(random.randint(9, 48)) T.listFonts().addCallback(lambda fnts: T.font(random.choice(fnts))) canvas.x += 15 class Reloader(rend.Page): canvas = None def locateChild(self, ctx, segs): if segs == ('',): reload(__import__(__name__)) self.canvas = CanvasDemo(words) self.canvas.addSlash = True return self.canvas, segs return self.canvas, segs def createResource(): if DEBUG: return Reloader() return CanvasDemo(words) Nevow-0.14.2/examples/children/0000755000175000017500000000000012761123542020265 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/children/__init__.py0000644000175000017500000000000012611541671022365 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/children/children.py0000644000175000017500000000722012611541671022431 0ustar mithrandimithrandi00000000000000""" Simple example of how child resources are located. """ from nevow import loaders from nevow import rend from nevow import tags as T from nevow import url class ChildPage(rend.Page): def __init__(self, name): rend.Page.__init__(self) self.name = name def child_childOfChild(self, context): return ChildOfChildPage(self.name) def render_name(self, context, data): return self.name docFactory = loaders.stan( T.html[ T.body[ T.h1['ChildPage'], T.p['My name is: ', T.span(id="name")[render_name]], T.p[ 'I have child too: ', T.a(id="child", href=url.here.child('childOfChild'))['my child'] ], ] ] ) class ChildOfChildPage(rend.Page): def __init__(self, parentName): rend.Page.__init__(self) self.parentName = parentName def render_parentName(self, context, data): return self.parentName docFactory = loaders.stan( T.html[ T.body[ T.h1['ChildOfChildPage'], T.p['My parent is the ChildPage called: ', T.span(id="parentName")[render_parentName]] ] ] ) class RootPage(rend.Page): addSlash = True # A resource that is always called 'foo' and only needs to be created once child_foo = ChildPage('foo') def child_bar(self, context): """A resource that is always called 'bar' but is created per-request """ return ChildPage('bar') def childFactory(self, ctx, name): """Create and return a child resource where the name is dynamic """ if name in ['1', '2', '3']: return ChildPage(name) def locateChild(self, ctx, segments): """Create and return a dynamically named child resource if child_ or childFactory didn't help. However, this time we get the chance to consume multiple path segments (inluding the childOfChild link). Note: locateChild is actually the main resource location API (see inevow.IReource) and it is actually rend.Page's implementation of the method that provides the child_ and childFactory functionality. """ # Let parent class have a go first # WARNING: This 3 lines work well until you use formless in this page # because formless will make locateChild return only one return value # (a deferred) on which you should add a callback that accepts a resource and # an empty tuple that represents no remaining segments. child, remainingSegments = rend.Page.locateChild(self, ctx, segments) if child: return child, remainingSegments # Consume all remaining path segments for the name return ChildPage('/'.join(segments)), [] docFactory = loaders.stan( T.html[ T.body[ T.h1['RootPage'], T.p['Fixed name, singleton resource: ', T.a(id="foo", href=url.here.child('foo'))['foo']], T.p['Fixed name, created per-request: ', T.a(id="bar", href=url.here.child('bar'))['bar']], T.p[ 'Dynamically named resources, located via childFactory: ', [(T.a(id=("d", n), href=url.here.child(n))[n],' ') for n in ['1', '2', '3']] ], T.p[ 'Dynamically named resources, located via locateChild: ', [(T.a(id=("d", n), href=url.here.child(n))[n],' ') for n in ['4', '5', '6/7']] ], ] ] ) Nevow-0.14.2/examples/children/childrenhtml.py0000644000175000017500000000521112611541671023314 0ustar mithrandimithrandi00000000000000""" Simple example of how child resources are located. """ from twisted.application import internet from twisted.application import service from twisted.python import util from nevow import appserver from nevow import loaders from nevow import rend from nevow import url class ChildPage(rend.Page): docFactory = loaders.xmlfile(util.sibpath(__file__, "childrenhtml_ChildPage.html")) def __init__(self, name): rend.Page.__init__(self) self.name = name def child_childOfChild(self, context): print "istanzaaa" return ChildOfChildPage(self.name) def render_name(self, context, data): return context.tag[self.name] def render_link(self, context, data): context.fillSlots('childLink', url.here.child('childOfChild')) return context.tag class ChildOfChildPage(rend.Page): docFactory = loaders.xmlfile(util.sibpath(__file__, "childrenhtml_ChildOfChildPage.html")) def __init__(self, parentName): rend.Page.__init__(self) self.parentName = parentName def render_parentName(self, context, data): return context.tag[self.parentName] class RootPage(rend.Page): addSlash = True docFactory = loaders.xmlfile(util.sibpath(__file__, "childrenhtml_RootPage.html")) # A resource that is always called 'foo' and only needs to be created once child_foo = ChildPage('foo') def child_bar(self, context): """A resource that is always called 'bar' but is created per-request """ return ChildPage('bar') def childFactory(self, ctx, name): """Create and return a child resource where the name is dynamic """ if name in ['1', '2', '3']: return ChildPage(name) def locateChild(self, ctx, segments): """Create and return a dynamically named child resource if child_ or childFactory didn't help. However, this time we get the chance to consume multiple path segments (inluding the childOfChild link). Note: locateChild is actually the main resource location API (see inevow.IReource) and it is actually rend.Page's implementation of the method that provides the child_ and childFactory functionality. """ # Let parent class have a go first child, remainingSegments = rend.Page.locateChild(self, ctx, segments) if child: return child, remainingSegments # Consume all remaining path segments for the name return ChildPage('/'.join(segments)), [] application = service.Application('children') internet.TCPServer(8080, appserver.NevowSite(RootPage())).setServiceParent(application) Nevow-0.14.2/examples/children/childrenhtml_ChildOfChildPage.html0000644000175000017500000000122212611541671026757 0ustar mithrandimithrandi00000000000000

ChildOfChildPage

My parent is the ChildPage called:

Nevow-0.14.2/examples/children/childrenhtml_ChildPage.html0000644000175000017500000000144312611541671025533 0ustar mithrandimithrandi00000000000000

ChildPage

My name is:

I have a child too: my child

Nevow-0.14.2/examples/children/childrenhtml_RootPage.html0000644000175000017500000000165212611541671025435 0ustar mithrandimithrandi00000000000000

RootPage

Fixed name, singleton resource: foo

Fixed name, created per-request: bar

Dynamically named resources, located via childFactory: 1 2 3

Dynamically named resources, located via locateChild: 4 5 6/7

Nevow-0.14.2/examples/customform/0000755000175000017500000000000012761123542020673 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/customform/__init__.py0000644000175000017500000000000012611541671022773 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/customform/customform.py0000644000175000017500000001321712611541671023450 0ustar mithrandimithrandi00000000000000################################################################################# # Example of using patterns to change the appearance of a webform. #from twisted.application import internet, service #from twisted.web import static from zope.interface import implements from nevow import rend from nevow import url from nevow import loaders from nevow import tags as T from formless import annotate from formless import webform ################################################################################# # This beasty defines how I want the form to look. It's a table (eek!). # webform looks for patterns to use when rendering parts of the form and fills # slots with key information. # # Key patterns are: # freeform-form -- the form itself, mostly just the structure # argument -- the pattern to use for arguments when nothing better # is found # argument!!fo -- the pattern to use for the 'fo' argument # # Inside the patterns the following slots are filled: # freeform-form: # form-action -- action attribute, where the form will be posted # form-id -- id of the form # form-name -- name of the form # form-label -- form label, extracted from the docstring # form-description -- description, also extracted from the docstring # form-error -- "global" error # form-arguments -- insertion point for the arguments' HTML # argument: # label -- label # input -- the form element (input, textarea, etc) # error -- error message (if any) # description -- description of argument # # Note that you do not have to provide slots for all of the above. For # instance, you may not want to display the descriptions. # # Chances are that this block of text would be in a disk template or # perhaps defined using stan in a taglib module. FORM_LAYOUT = loaders.xmlstr( """

:
:
""").load() ################################################################################# # ISomething and Page are just something to test the form rendering on. class ISomething(annotate.TypedInterface): def doSomething( ctx = annotate.Context(), fee = annotate.String(required=True, description="Wee!"), fi = annotate.Integer(description="Tra-la-la"), fo = annotate.Text(), fum = annotate.String(), ): """Do Something Really Exciting Normally you would put a useful description of the interface here but, since the inteface is useless anyway, I cannot think of anything useful to say about it. Although ... did I mention it is useless?""" doSomething = annotate.autocallable(doSomething) class Root(rend.Page): """Render a custom and normal form for an ISomething. """ implements(ISomething) addSlash = True child_webform_css = webform.defaultCSS def render_normalForm(self, ctx, data): return webform.renderForms() def render_customForm(self, ctx, data): return webform.renderForms()[FORM_LAYOUT] def doSomething(self, ctx, **kwargs): print '***** doSomething called with:', kwargs docFactory = loaders.stan( T.html[ T.head[ T.title['Example :: Custom Form Layout'], T.link(rel='stylesheet', type='text/css', href=url.here.child("webform_css")), ], T.body[ T.h1['Custom'], render_customForm, T.h1['Default'], render_normalForm, ] ] ) #application = service.Application('hellostan') #webServer = internet.TCPServer(8080, appserver.NevowSite(Root())) #webServer.setServiceParent(application) Nevow-0.14.2/examples/db/0000755000175000017500000000000012761123542017062 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/db/__init__.py0000644000175000017500000000000012611541671021162 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/db/db.py0000644000175000017500000001060512611541671020024 0ustar mithrandimithrandi00000000000000 from zope.interface import implements from nevow import inevow from nevow import loaders from nevow import rend from nevow import tags from nevow.url import here from formless import annotate from formless import webform whole = [(1, 'one'), (2, 'two'), (3, 'buckle'), (4, 'my'), (5, 'shoe')] def doQuery(q, *args): """Pretend like we have a database and we are accessing it through this hypothetical interface. Ignore this. Use dbapi or adbapi instead, and build a real sql table. I hope that's obvious. """ matchid = 'select * from foo where id =' setsql = 'update foo set subject = ' insertsql = 'insert into foo values' if q == 'select * from foo': return whole elif q.startswith(matchid): theId = args[0] for dbid, subj in whole: if dbid == theId: return [(dbid, subj)] raise KeyError, theId elif q.startswith(setsql): newsubj, theId = args for index, (dbid, subj) in enumerate(whole): if dbid == theId: whole[index] = (dbid, newsubj) elif q.startswith(insertsql): max = whole[-1][0] subject, = args whole.append((max + 1, subject)) class IAddItem(annotate.TypedInterface): def addItem(newSubject=annotate.String()): pass addItem = annotate.autocallable(addItem) class DBBrowser(rend.Page): implements(IAddItem) addSlash = True def addItem(self, newSubject): doQuery('insert into foo values subject = "%s"', newSubject) def data_queryDatabase(self, context, data): return doQuery('select * from foo') def render_row(self, context, data): theId, theSubj = data return context.tag[ # put our anchor in the li provided by the template tags.a(href=theId)[ theSubj ] ] docFactory = loaders.stan( tags.html[ tags.body[ tags.h1["Welcome, user"], tags.ul(data=tags.directive("queryDatabase"), render=tags.directive("sequence"))[ tags.li(pattern="item", render=render_row) ], webform.renderForms() ] ] ) def childFactory(self, ctx, name): """Since we created anchor tags linking to children of this resource directly by id, when the anchor is clicked, childFactory will be called with the appropriate id as the name argument.""" try: ## Pass the id of the database item we want to be rendered on this page ## to the DBItem constructor. This integer will be used as the default data ## for this page. return DBItem(int(name)) except ValueError: pass ## returning None results in a 404 class IItemWithSubject(annotate.TypedInterface): def setSubject(newSubject=annotate.String(label="Change Subject")): pass setSubject = annotate.autocallable(setSubject) class DBItem(rend.Page): implements(IItemWithSubject) addSlash=True def setSubject(self, newSubject): ## Self.original is the data that was passed to the DBItem constructor above; the id of this record doQuery('update foo set subject = "%s" where id = %s', newSubject, self.original) def render_viewSelector(self, context, data): args = inevow.IRequest(context).args view = args.get('view', ['view'])[0] if view == 'view': selector = "View | ", tags.a(href=here.add('view','edit'))[ "Edit" ] editor = '' else: selector = tags.a(href=here.add('view','view'))["View"], " | Edit" editor = context.onePattern('edit')() # get one copy of the edit pattern viewer = context.onePattern('view')() # get one copy of the view pattern return selector, viewer, editor def render_itemDetail(self, context, data): theId, theSubject = doQuery('select * from foo where id = %s', self.original)[0] return tags.h2["Object ", theId], tags.span["Subject: ", theSubject] docFactory = loaders.stan( tags.html[ tags.body[ tags.p[tags.a(href=here.parent())["Up"]], tags.div(render=render_viewSelector)[ tags.p(pattern="edit")[webform.renderForms()], tags.p(pattern="view")[render_itemDetail] ] ] ] ) Nevow-0.14.2/examples/disktemplates/0000755000175000017500000000000012761123542021346 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/disktemplates/__init__.py0000644000175000017500000000000012611541671023446 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/disktemplates/disktemplates.html0000644000175000017500000000363512611541671025115 0ustar mithrandimithrandi00000000000000 This is title

Welcome

First ColumnSecond Column
Stuff:
-----
Nothing.
First ColumnSecond Column
  • HEADER
  • Stuff: !
  • -----
  • Nothing.
  • FOOTER

This entire node, including the span tag, will be replaced by a randomly chosen node from below: one
twotwotwo

  1. three
  2. three
  3. three

Nevow-0.14.2/examples/disktemplates/disktemplates.py0000644000175000017500000000101212611541671024564 0ustar mithrandimithrandi00000000000000import random from nevow import inevow, loaders, rend from twisted.python import util class Mine(rend.Page): addSlash = True docFactory = loaders.xmlfile(util.sibpath(__file__, 'disktemplates.html')) def render_foo(self, context, data): return inevow.IQ(context).onePattern(random.choice(['one', 'two', 'three'])) def data_theList(self, context, data): return [random.randint(0, 5000) for x in range(random.randint(0, 10))] def data_empty(self, context, data): return [] Nevow-0.14.2/examples/disktemplates/disktemplates_stan.py0000644000175000017500000000464512611541671025630 0ustar mithrandimithrandi00000000000000import random from twisted.application import service from twisted.application import internet from nevow import inevow from nevow import appserver from nevow import loaders from nevow import rend from nevow import tags as T from nevow.stan import directive class Mine(rend.Page): addSlash = True docFactory = loaders.stan( T.html[ T.head[ T.title["This is title"] ], T.body[ T.h1(id="header")["Welcome"], T.ol(data=directive("theList"), render=directive("sequence"))[ T.span(pattern="header")["HEADER"], T.li(pattern="item")["Stuff: ",T.span(render=directive("string")), "!"], T.span(pattern="divider")["-----"], T.div(pattern="empty")["Nothing."], T.span(pattern="footer")["FOOTER"], ], T.ol(data=directive("empty"), render=directive("sequence"))[ T.span(pattern="header")["HEADER"], T.li(pattern="item")["Stuff: ",T.span(render=directive("string")), "!"], T.span(pattern="divider")["-----"], T.div(pattern="empty")["Nothing."], T.span(pattern="footer")["FOOTER"], ], T.span(render=directive("foo"))[ "This entire node, including the span tag, will be replaced by \ a randomly chosen node from below:", T.div(pattern="one", style="color: red")["one"], T.table(pattern="two")[ T.tr[T.td["two"],T.td["two"],T.td["two"]] ], T.ol(pattern="three")[ T.li["three"], T.li["three"], T.li["three"], ] ] ] ] ) def render_foo(self, context, data): return inevow.IQ(context).onePattern(random.choice(['one', 'two', 'three'])) def data_theList(self, context, data): return [random.randint(0, 5000) for x in range(random.randint(0, 10))] def data_empty(self, context, data): return [] application = service.Application("disktemplates") internet.TCPServer( 8080, appserver.NevowSite( Mine() ) ).setServiceParent(application) Nevow-0.14.2/examples/files/0000755000175000017500000000000012761123542017577 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/files/words0000644000175000017500000027234112611541671020672 0ustar mithrandimithrandi00000000000000A a aa aal aalii aam Aani aardvark aardwolf Aaron Aaronic Aaronical Aaronite Aaronitic Aaru Ab aba Ababdeh Ababua abac abaca abacate abacay abacinate abacination abaciscus abacist aback abactinal abactinally abaction abactor abaculus abacus Abadite abaff abaft abaisance abaiser abaissed abalienate abalienation abalone Abama abampere abandon abandonable abandoned abandonedly abandonee abandoner abandonment Abanic Abantes abaptiston Abarambo Abaris abarthrosis abarticular abarticulation abas abase abased abasedly abasedness abasement abaser Abasgi abash abashed abashedly abashedness abashless abashlessly abashment abasia abasic abask Abassin abastardize abatable abate abatement abater abatis abatised abaton abator abattoir Abatua abature abave abaxial abaxile abaze abb Abba abbacomes abbacy Abbadide abbas abbasi abbassi Abbasside abbatial abbatical abbess abbey abbeystede Abbie abbot abbotcy abbotnullius abbotship abbreviate abbreviately abbreviation abbreviator abbreviatory abbreviature Abby abcoulomb abdal abdat Abderian Abderite abdest abdicable abdicant abdicate abdication abdicative abdicator Abdiel abditive abditory abdomen abdominal Abdominales abdominalian abdominally abdominoanterior abdominocardiac abdominocentesis abdominocystic abdominogenital abdominohysterectomy abdominohysterotomy abdominoposterior abdominoscope abdominoscopy abdominothoracic abdominous abdominovaginal abdominovesical abduce abducens abducent abduct abduction abductor Abe abeam abear abearance abecedarian abecedarium abecedary abed abeigh Abel abele Abelia Abelian Abelicea Abelite abelite Abelmoschus abelmosk Abelonian abeltree Abencerrages abenteric abepithymia Aberdeen aberdevine Aberdonian Aberia aberrance aberrancy aberrant aberrate aberration aberrational aberrator aberrometer aberroscope aberuncator abet abetment abettal abettor abevacuation abey abeyance abeyancy abeyant abfarad abhenry abhiseka abhominable abhor abhorrence abhorrency abhorrent abhorrently abhorrer abhorrible abhorring Abhorson abidal abidance abide abider abidi abiding abidingly abidingness Abie Abies abietate abietene abietic abietin Abietineae abietineous abietinic Abiezer Abigail abigail abigailship abigeat abigeus abilao ability abilla abilo abintestate abiogenesis abiogenesist abiogenetic abiogenetical abiogenetically abiogenist abiogenous abiogeny abiological abiologically abiology abiosis abiotic abiotrophic abiotrophy Abipon abir abirritant abirritate abirritation abirritative abiston Abitibi abiuret abject abjectedness abjection abjective abjectly abjectness abjoint abjudge abjudicate abjudication abjunction abjunctive abjuration abjuratory abjure abjurement abjurer abkar abkari Abkhas Abkhasian ablach ablactate ablactation ablare ablastemic ablastous ablate ablation ablatitious ablatival ablative ablator ablaut ablaze able ableeze ablegate ableness ablepharia ablepharon ablepharous Ablepharus ablepsia ableptical ableptically abler ablest ablewhackets ablins abloom ablow ablude abluent ablush ablution ablutionary abluvion ably abmho Abnaki abnegate abnegation abnegative abnegator Abner abnerval abnet abneural abnormal abnormalism abnormalist abnormality abnormalize abnormally abnormalness abnormity abnormous abnumerable Abo aboard Abobra abode abodement abody abohm aboil abolish abolisher abolishment abolition abolitionary abolitionism abolitionist abolitionize abolla aboma abomasum abomasus abominable abominableness abominably abominate abomination abominator abomine Abongo aboon aborad aboral aborally abord aboriginal aboriginality aboriginally aboriginary aborigine abort aborted aborticide abortient abortifacient abortin abortion abortional abortionist abortive abortively abortiveness abortus abouchement abound abounder abounding aboundingly about abouts above aboveboard abovedeck aboveground aboveproof abovestairs abox abracadabra abrachia abradant abrade abrader Abraham Abrahamic Abrahamidae Abrahamite Abrahamitic abraid Abram Abramis abranchial abranchialism abranchian Abranchiata abranchiate abranchious abrasax abrase abrash abrasiometer abrasion abrasive abrastol abraum abraxas abreact abreaction abreast abrenounce abret abrico abridge abridgeable abridged abridgedly abridger abridgment abrim abrin abristle abroach abroad Abrocoma abrocome abrogable abrogate abrogation abrogative abrogator Abroma Abronia abrook abrotanum abrotine abrupt abruptedly abruption abruptly abruptness Abrus Absalom absampere Absaroka absarokite abscess abscessed abscession abscessroot abscind abscise abscision absciss abscissa abscissae abscisse abscission absconce abscond absconded abscondedly abscondence absconder absconsa abscoulomb absence absent absentation absentee absenteeism absenteeship absenter absently absentment absentmindedly absentness absfarad abshenry Absi absinthe absinthial absinthian absinthiate absinthic absinthin absinthine absinthism absinthismic absinthium absinthol absit absmho absohm absolute absolutely absoluteness absolution absolutism absolutist absolutistic absolutistically absolutive absolutization absolutize absolutory absolvable absolvatory absolve absolvent absolver absolvitor absolvitory absonant absonous absorb absorbability absorbable absorbed absorbedly absorbedness absorbefacient absorbency absorbent absorber absorbing absorbingly absorbition absorpt absorptance absorptiometer absorptiometric absorption absorptive absorptively absorptiveness absorptivity absquatulate abstain abstainer abstainment abstemious abstemiously abstemiousness abstention abstentionist abstentious absterge abstergent abstersion abstersive abstersiveness abstinence abstinency abstinent abstinential abstinently abstract abstracted abstractedly abstractedness abstracter abstraction abstractional abstractionism abstractionist abstractitious abstractive abstractively abstractiveness abstractly abstractness abstractor abstrahent abstricted abstriction abstruse abstrusely abstruseness abstrusion abstrusity absume absumption absurd absurdity absurdly absurdness absvolt Absyrtus abterminal abthain abthainrie abthainry abthanage Abu abu abucco abulia abulic abulomania abuna abundance abundancy abundant Abundantia abundantly abura aburabozu aburban aburst aburton abusable abuse abusedly abusee abuseful abusefully abusefulness abuser abusion abusious abusive abusively abusiveness abut Abuta Abutilon abutment abuttal abutter abutting abuzz abvolt abwab aby abysm abysmal abysmally abyss abyssal Abyssinian abyssobenthonic abyssolith abyssopelagic acacatechin acacatechol acacetin Acacia Acacian acaciin acacin academe academial academian Academic academic academical academically academicals academician academicism academism academist academite academization academize Academus academy Acadia acadialite Acadian Acadie Acaena acajou acaleph Acalepha Acalephae acalephan acalephoid acalycal acalycine acalycinous acalyculate Acalypha Acalypterae Acalyptrata Acalyptratae acalyptrate Acamar acampsia acana acanaceous acanonical acanth acantha Acanthaceae acanthaceous acanthad Acantharia Acanthia acanthial acanthin acanthine acanthion acanthite acanthocarpous Acanthocephala acanthocephalan Acanthocephali acanthocephalous Acanthocereus acanthocladous Acanthodea acanthodean Acanthodei Acanthodes acanthodian Acanthodidae Acanthodii Acanthodini acanthoid Acantholimon acanthological acanthology acantholysis acanthoma Acanthomeridae acanthon Acanthopanax Acanthophis acanthophorous acanthopod acanthopodous acanthopomatous acanthopore acanthopteran Acanthopteri acanthopterous acanthopterygian Acanthopterygii acanthosis acanthous Acanthuridae Acanthurus acanthus acapnia acapnial acapsular acapu acapulco acara Acarapis acardia acardiac acari acarian acariasis acaricidal acaricide acarid Acarida Acaridea acaridean acaridomatium acariform Acarina acarine acarinosis acarocecidium acarodermatitis acaroid acarol acarologist acarology acarophilous acarophobia acarotoxic acarpelous acarpous Acarus Acastus acatalectic acatalepsia acatalepsy acataleptic acatallactic acatamathesia acataphasia acataposis acatastasia acatastatic acate acategorical acatery acatharsia acatharsy acatholic acaudal acaudate acaulescent acauline acaulose acaulous acca accede accedence acceder accelerable accelerando accelerant accelerate accelerated acceleratedly acceleration accelerative accelerator acceleratory accelerograph accelerometer accend accendibility accendible accension accensor accent accentless accentor accentuable accentual accentuality accentually accentuate accentuation accentuator accentus accept acceptability acceptable acceptableness acceptably acceptance acceptancy acceptant acceptation accepted acceptedly accepter acceptilate acceptilation acception acceptive acceptor acceptress accerse accersition accersitor access accessarily accessariness accessary accessaryship accessibility accessible accessibly accession accessional accessioner accessive accessively accessless accessorial accessorily accessoriness accessorius accessory accidence accidency accident accidental accidentalism accidentalist accidentality accidentally accidentalness accidented accidential accidentiality accidently accidia accidie accinge accipient Accipiter accipitral accipitrary Accipitres accipitrine accismus accite acclaim acclaimable acclaimer acclamation acclamator acclamatory acclimatable acclimatation acclimate acclimatement acclimation acclimatizable acclimatization acclimatize acclimatizer acclimature acclinal acclinate acclivitous acclivity acclivous accloy accoast accoil accolade accoladed accolated accolent accolle accombination accommodable accommodableness accommodate accommodately accommodateness accommodating accommodatingly accommodation accommodational accommodative accommodativeness accommodator accompanier accompaniment accompanimental accompanist accompany accompanyist accompletive accomplice accompliceship accomplicity accomplish accomplishable accomplished accomplisher accomplishment accomplisht accompt accord accordable accordance accordancy accordant accordantly accorder according accordingly accordion accordionist accorporate accorporation accost accostable accosted accouche accouchement accoucheur accoucheuse account accountability accountable accountableness accountably accountancy accountant accountantship accounting accountment accouple accouplement accouter accouterment accoy accredit accreditate accreditation accredited accreditment accrementitial accrementition accresce accrescence accrescent accretal accrete accretion accretionary accretive accroach accroides accrual accrue accruement accruer accubation accubitum accubitus accultural acculturate acculturation acculturize accumbency accumbent accumber accumulable accumulate accumulation accumulativ accumulative accumulatively accumulativeness accumulator accuracy accurate accurately accurateness accurse accursed accursedly accursedness accusable accusably accusal accusant accusation accusatival accusative accusatively accusatorial accusatorially accusatory accusatrix accuse accused accuser accusingly accusive accustom accustomed accustomedly accustomedness ace aceacenaphthene aceanthrene aceanthrenequinone acecaffine aceconitic acedia acediamine acediast acedy Aceldama Acemetae Acemetic acenaphthene acenaphthenyl acenaphthylene acentric acentrous aceologic aceology acephal Acephala acephalan Acephali acephalia Acephalina acephaline acephalism acephalist Acephalite acephalocyst acephalous acephalus Acer Aceraceae aceraceous Acerae Acerata acerate Acerates acerathere Aceratherium aceratosis acerb Acerbas acerbate acerbic acerbity acerdol acerin acerose acerous acerra acertannin acervate acervately acervation acervative acervose acervuline acervulus acescence acescency acescent aceship acesodyne Acestes acetabular Acetabularia acetabuliferous acetabuliform acetabulous acetabulum acetacetic acetal acetaldehydase acetaldehyde acetaldehydrase acetalization acetalize acetamide acetamidin acetamidine acetamido acetaminol acetanilid acetanilide acetanion acetaniside acetanisidide acetannin acetarious acetarsone acetate acetated acetation acetbromamide acetenyl acethydrazide acetic acetification acetifier acetify acetimeter acetimetry acetin acetize acetmethylanilide acetnaphthalide acetoacetanilide acetoacetate acetoacetic acetoamidophenol acetoarsenite Acetobacter acetobenzoic acetobromanilide acetochloral acetocinnamene acetoin acetol acetolysis acetolytic acetometer acetometrical acetometrically acetometry acetomorphine acetonaphthone acetonate acetonation acetone acetonemia acetonemic acetonic acetonitrile acetonization acetonize acetonuria acetonurometer acetonyl acetonylacetone acetonylidene acetophenetide acetophenin acetophenine acetophenone acetopiperone acetopyrin acetosalicylic acetose acetosity acetosoluble acetothienone acetotoluide acetotoluidine acetous acetoveratrone acetoxime acetoxyl acetoxyphthalide acetphenetid acetphenetidin acetract acettoluide acetum aceturic acetyl acetylacetonates acetylacetone acetylamine acetylate acetylation acetylator acetylbenzene acetylbenzoate acetylbenzoic acetylbiuret acetylcarbazole acetylcellulose acetylcholine acetylcyanide acetylenation acetylene acetylenediurein acetylenic acetylenyl acetylfluoride acetylglycine acetylhydrazine acetylic acetylide acetyliodide acetylizable acetylization acetylize acetylizer acetylmethylcarbinol acetylperoxide acetylphenol acetylphenylhydrazine acetylrosaniline acetylsalicylate acetylsalol acetyltannin acetylthymol acetyltropeine acetylurea ach Achaean Achaemenian Achaemenid Achaemenidae Achaemenidian Achaenodon Achaeta achaetous achage Achagua Achakzai achalasia Achamoth Achango achar Achariaceae Achariaceous achate Achates Achatina Achatinella Achatinidae ache acheilia acheilous acheiria acheirous acheirus Achen achene achenial achenium achenocarp achenodium acher Achernar Acheronian Acherontic Acherontical achete Achetidae Acheulean acheweed achievable achieve achievement achiever achigan achilary achill Achillea Achillean Achilleid achilleine Achillize achillobursitis achillodynia achime Achimenes Achinese aching achingly achira Achitophel achlamydate Achlamydeae achlamydeous achlorhydria achlorophyllous achloropsia Achmetha acholia acholic Acholoe acholous acholuria acholuric Achomawi achondrite achondritic achondroplasia achondroplastic achor achordal Achordata achordate Achorion Achras achree achroacyte Achroanthes achrodextrin achrodextrinase achroglobin achroiocythaemia achroiocythemia achroite achroma achromacyte achromasia achromat achromate Achromatiaceae achromatic achromatically achromaticity achromatin achromatinic achromatism Achromatium achromatizable achromatization achromatize achromatocyte achromatolysis achromatope achromatophile achromatopia achromatopsia achromatopsy achromatosis achromatous achromaturia achromia achromic Achromobacter Achromobacterieae achromoderma achromophilous achromotrichia achromous achronical achroodextrin achroodextrinase achroous achropsia achtehalber achtel achtelthaler Achuas achy achylia achylous achymia achymous Achyranthes Achyrodes acichloride acicula acicular acicularly aciculate aciculated aciculum acid Acidanthera Acidaspis acidemia acider acidic acidiferous acidifiable acidifiant acidific acidification acidifier acidify acidimeter acidimetric acidimetrical acidimetrically acidimetry acidite acidity acidize acidly acidness acidoid acidology acidometer acidometry acidophile acidophilic acidophilous acidoproteolytic acidosis acidosteophyte acidotic acidproof acidulate acidulent acidulous aciduric acidyl acier acierage Acieral acierate acieration aciform aciliate aciliated Acilius acinaceous acinaces acinacifolious acinaciform acinar acinarious acinary Acineta Acinetae acinetan Acinetaria acinetarian acinetic acinetiform Acinetina acinetinan acinic aciniform acinose acinotubular acinous acinus Acipenser Acipenseres acipenserid Acipenseridae acipenserine acipenseroid Acipenseroidei Acis aciurgy acker ackey ackman acknow acknowledge acknowledgeable acknowledged acknowledgedly acknowledger aclastic acle acleidian acleistous Aclemon aclidian aclinal aclinic acloud aclys Acmaea Acmaeidae acmatic acme acmesthesia acmic Acmispon acmite acne acneform acneiform acnemia Acnida acnodal acnode Acocanthera acocantherin acock acockbill acocotl Acoela Acoelomata acoelomate acoelomatous Acoelomi acoelomous acoelous Acoemetae Acoemeti Acoemetic acoin acoine Acolapissa acold Acolhua Acolhuan acologic acology acolous acoluthic acolyte acolythate Acoma acoma acomia acomous aconative acondylose acondylous acone aconic aconin aconine aconital aconite aconitia aconitic aconitin aconitine Aconitum Acontias acontium Acontius aconuresis acopic acopon acopyrin acopyrine acor acorea acoria acorn acorned Acorus acosmic acosmism acosmist acosmistic acotyledon acotyledonous acouasm acouchi acouchy acoumeter acoumetry acouometer acouophonia acoupa acousmata acousmatic acoustic acoustical acoustically acoustician acousticolateral Acousticon acoustics acquaint acquaintance acquaintanceship acquaintancy acquaintant acquainted acquaintedness acquest acquiesce acquiescement acquiescence acquiescency acquiescent acquiescently acquiescer acquiescingly acquirability acquirable acquire acquired acquirement acquirenda acquirer acquisible acquisite acquisited acquisition acquisitive acquisitively acquisitiveness acquisitor acquisitum acquist acquit acquitment acquittal acquittance acquitter Acrab acracy acraein Acraeinae acraldehyde Acrania acranial acraniate acrasia Acrasiaceae Acrasiales Acrasida Acrasieae Acraspeda acraspedote acratia acraturesis acrawl acraze acre acreable acreage acreak acream acred Acredula acreman acrestaff acrid acridan acridian acridic Acrididae Acridiidae acridine acridinic acridinium acridity Acridium acridly acridness acridone acridonium acridophagus acridyl acriflavin acriflavine acrimonious acrimoniously acrimoniousness acrimony acrindoline acrinyl acrisia Acrisius Acrita acritan acrite acritical acritol Acroa acroaesthesia acroama acroamatic acroamatics acroanesthesia acroarthritis acroasphyxia acroataxia acroatic acrobacy acrobat Acrobates acrobatholithic acrobatic acrobatical acrobatically acrobatics acrobatism acroblast acrobryous acrobystitis Acrocarpi acrocarpous acrocephalia acrocephalic acrocephalous acrocephaly Acrocera Acroceratidae Acroceraunian Acroceridae Acrochordidae Acrochordinae acrochordon Acroclinium Acrocomia acroconidium acrocontracture acrocoracoid acrocyanosis acrocyst acrodactylum acrodermatitis acrodont acrodontism acrodrome acrodromous Acrodus acrodynia acroesthesia acrogamous acrogamy acrogen acrogenic acrogenous acrogenously acrography Acrogynae acrogynae acrogynous acrolein acrolith acrolithan acrolithic acrologic acrologically acrologism acrologue acrology acromania acromastitis acromegalia acromegalic acromegaly acromelalgia acrometer acromial acromicria acromioclavicular acromiocoracoid acromiodeltoid acromiohumeral acromiohyoid acromion acromioscapular acromiosternal acromiothoracic acromonogrammatic acromphalus Acromyodi acromyodian acromyodic acromyodous acromyotonia acromyotonus acron acronarcotic acroneurosis acronical acronically acronyc acronych Acronycta acronyctous acronym acronymic acronymize acronymous acronyx acrook acroparalysis acroparesthesia acropathology acropathy acropetal acropetally acrophobia acrophonetic acrophonic acrophony acropodium acropoleis acropolis acropolitan Acropora acrorhagus acrorrheuma acrosarc acrosarcum acroscleriasis acroscleroderma acroscopic acrose acrosome acrosphacelus acrospire acrospore acrosporous across acrostic acrostical acrostically acrostichal Acrosticheae acrostichic acrostichoid Acrostichum acrosticism acrostolion acrostolium acrotarsial acrotarsium acroteleutic acroterial acroteric acroterium Acrothoracica acrotic acrotism acrotomous Acrotreta Acrotretidae acrotrophic acrotrophoneurosis Acrux Acrydium acryl acrylaldehyde acrylate acrylic acrylonitrile acrylyl act acta actability actable Actaea Actaeaceae Actaeon Actaeonidae Actiad Actian actification actifier actify actin actinal actinally actinautographic actinautography actine actinenchyma acting Actinia actinian Actiniaria actiniarian actinic actinically Actinidia Actinidiaceae actiniferous actiniform actinine actiniochrome actiniohematin Actiniomorpha actinism Actinistia actinium actinobacillosis Actinobacillus actinoblast actinobranch actinobranchia actinocarp actinocarpic actinocarpous actinochemistry actinocrinid Actinocrinidae actinocrinite Actinocrinus actinocutitis actinodermatitis actinodielectric actinodrome actinodromous actinoelectric actinoelectrically actinoelectricity actinogonidiate actinogram actinograph actinography actinoid Actinoida Actinoidea actinolite actinolitic actinologous actinologue actinology actinomere actinomeric actinometer actinometric actinometrical actinometry actinomorphic actinomorphous actinomorphy Actinomyces Actinomycetaceae Actinomycetales actinomycete actinomycetous actinomycin actinomycoma actinomycosis actinomycotic Actinomyxidia Actinomyxidiida actinon Actinonema actinoneuritis actinophone actinophonic actinophore actinophorous actinophryan Actinophrys Actinopoda actinopraxis actinopteran Actinopteri actinopterous actinopterygian Actinopterygii actinopterygious actinoscopy actinosoma actinosome Actinosphaerium actinost actinostereoscopy actinostomal actinostome actinotherapeutic actinotherapeutics actinotherapy actinotoxemia actinotrichium actinotrocha actinouranium Actinozoa actinozoal actinozoan actinozoon actinula action actionable actionably actional actionary actioner actionize actionless Actipylea Actium activable activate activation activator active actively activeness activin activism activist activital activity activize actless actomyosin acton actor actorship actress Acts actu actual actualism actualist actualistic actuality actualization actualize actually actualness actuarial actuarially actuarian actuary actuaryship actuation actuator acture acturience actutate acuaesthesia Acuan acuate acuation Acubens acuclosure acuductor acuesthesia acuity aculea Aculeata aculeate aculeated aculeiform aculeolate aculeolus aculeus acumen acuminate acumination acuminose acuminous acuminulate acupress acupressure acupunctuate acupunctuation acupuncturation acupuncturator acupuncture acurative acushla acutangular acutate acute acutely acutenaculum acuteness acutiator acutifoliate Acutilinguae acutilingual acutilobate acutiplantar acutish acutograve acutonodose acutorsion acyanoblepsia acyanopsia acyclic acyesis acyetic acyl acylamido acylamidobenzene acylamino acylate acylation acylogen acyloin acyloxy acyloxymethane acyrological acyrology acystia ad Ada adactyl adactylia adactylism adactylous Adad adad adage adagial adagietto adagio Adai Adaize Adam adamant adamantean adamantine adamantinoma adamantoblast adamantoblastoma adamantoid adamantoma adamas Adamastor adambulacral adamellite Adamhood Adamic Adamical Adamically adamine Adamite adamite Adamitic Adamitical Adamitism Adamsia adamsite adance adangle Adansonia Adapa adapid Adapis adapt adaptability adaptable adaptation adaptational adaptationally adaptative adaptedness adapter adaption adaptional adaptionism adaptitude adaptive adaptively adaptiveness adaptometer adaptor adaptorial Adar adarme adat adati adatom adaunt adaw adawe adawlut adawn adaxial aday adays adazzle adcraft add Adda adda addability addable addax addebted added addedly addend addenda addendum adder adderbolt adderfish adderspit adderwort addibility addible addicent addict addicted addictedness addiction Addie addiment Addisonian Addisoniana additament additamentary addition additional additionally additionary additionist addititious additive additively additivity additory addle addlebrain addlebrained addlehead addleheaded addleheadedly addleheadedness addlement addleness addlepate addlepated addlepatedness addleplot addlings addlins addorsed address addressee addresser addressful Addressograph addressor addrest Addu adduce adducent adducer adducible adduct adduction adductive adductor Addy Ade ade adead adeem adeep Adela Adelaide Adelarthra Adelarthrosomata adelarthrosomatous Adelbert Adelea Adeleidae Adelges Adelia Adelina Adeline adeling adelite Adeliza adelocerous Adelochorda adelocodonic adelomorphic adelomorphous adelopod Adelops Adelphi Adelphian adelphogamy Adelphoi adelpholite adelphophagy ademonist adempted ademption adenalgia adenalgy Adenanthera adenase adenasthenia adendric adendritic adenectomy adenectopia adenectopic adenemphractic adenemphraxis adenia adeniform adenine adenitis adenization adenoacanthoma adenoblast adenocancroid adenocarcinoma adenocarcinomatous adenocele adenocellulitis adenochondroma adenochondrosarcoma adenochrome adenocyst adenocystoma adenocystomatous adenodermia adenodiastasis adenodynia adenofibroma adenofibrosis adenogenesis adenogenous adenographer adenographic adenographical adenography adenohypersthenia adenoid adenoidal adenoidism adenoliomyofibroma adenolipoma adenolipomatosis adenologaditis adenological adenology adenolymphocele adenolymphoma adenoma adenomalacia adenomatome adenomatous adenomeningeal adenometritis adenomycosis adenomyofibroma adenomyoma adenomyxoma adenomyxosarcoma adenoncus adenoneural adenoneure adenopathy adenopharyngeal adenopharyngitis adenophlegmon Adenophora adenophore adenophorous adenophthalmia adenophyllous adenophyma adenopodous adenosarcoma adenosclerosis adenose adenosine adenosis adenostemonous Adenostoma adenotome adenotomic adenotomy adenotyphoid adenotyphus adenyl adenylic Adeodatus Adeona Adephaga adephagan adephagia adephagous adept adeptness adeptship adequacy adequate adequately adequateness adequation adequative adermia adermin Adessenarian adet adevism adfected adfix adfluxion adglutinate Adhafera adhaka adhamant Adhara adharma adhere adherence adherency adherent adherently adherer adherescence adherescent adhesion adhesional adhesive adhesively adhesivemeter adhesiveness adhibit adhibition adiabatic adiabatically adiabolist adiactinic adiadochokinesis adiagnostic adiantiform Adiantum adiaphon adiaphonon adiaphoral adiaphoresis adiaphoretic adiaphorism adiaphorist adiaphoristic adiaphorite adiaphoron adiaphorous adiate adiathermal adiathermancy adiathermanous adiathermic adiathetic adiation Adib Adicea adicity Adiel adieu adieux Adigei Adighe Adigranth adigranth Adin Adinida adinidan adinole adion adipate adipescent adipic adipinic adipocele adipocellulose adipocere adipoceriform adipocerous adipocyte adipofibroma adipogenic adipogenous adipoid adipolysis adipolytic adipoma adipomatous adipometer adipopexia adipopexis adipose adiposeness adiposis adiposity adiposogenital adiposuria adipous adipsia adipsic adipsous adipsy adipyl Adirondack adit adital aditus adjacency adjacent adjacently adjag adject adjection adjectional adjectival adjectivally adjective adjectively adjectivism adjectivitis adjiger adjoin adjoined adjoinedly adjoining adjoint adjourn adjournal adjournment adjudge adjudgeable adjudger adjudgment adjudicate adjudication adjudicative adjudicator adjudicature adjunct adjunction adjunctive adjunctively adjunctly adjuration adjuratory adjure adjurer adjust adjustable adjustably adjustage adjustation adjuster adjustive adjustment adjutage adjutancy adjutant adjutantship adjutorious adjutory adjutrice adjuvant adlay adless adlet Adlumia adlumidine adlumine adman admarginate admaxillary admeasure admeasurement admeasurer admedial admedian admensuration admi adminicle adminicula adminicular adminiculary adminiculate adminiculation adminiculum administer administerd administerial administrable administrant administrate administration administrational administrative administratively administrator administratorship administratress administratrices administratrix admirability admirable admirableness admirably admiral admiralship admiralty admiration admirative admirator admire admired admiredly admirer admiring admiringly admissibility admissible admissibleness admissibly admission admissive admissory admit admittable admittance admitted admittedly admittee admitter admittible admix admixtion admixture admonish admonisher admonishingly admonishment admonition admonitioner admonitionist admonitive admonitively admonitor admonitorial admonitorily admonitory admonitrix admortization adnascence adnascent adnate adnation adnephrine adnerval adneural adnex adnexal adnexed adnexitis adnexopexy adnominal adnominally adnomination adnoun ado adobe adolesce adolescence adolescency adolescent adolescently Adolph Adolphus Adonai Adonean Adonia Adoniad Adonian Adonic adonidin adonin Adoniram Adonis adonite adonitol adonize adoperate adoperation adopt adoptability adoptable adoptant adoptative adopted adoptedly adoptee adopter adoptian adoptianism adoptianist adoption adoptional adoptionism adoptionist adoptious adoptive adoptively adorability adorable adorableness adorably adoral adorally adorant Adorantes adoration adoratory adore adorer Adoretus adoringly adorn adorner adorningly adornment adosculation adossed adoulie adown Adoxa Adoxaceae adoxaceous adoxography adoxy adoze adpao adpress adpromission adradial adradially adradius Adramelech Adrammelech adread adream adreamed adreamt adrectal adrenal adrenalectomize adrenalectomy Adrenalin adrenaline adrenalize adrenalone adrenergic adrenin adrenine adrenochrome adrenocortical adrenocorticotropic adrenolysis adrenolytic adrenotropic Adrian Adriana Adriatic Adrienne adrift adrip adroit adroitly adroitness adroop adrop adrostral adrowse adrue adry adsbud adscendent adscititious adscititiously adscript adscripted adscription adscriptitious adscriptitius adscriptive adsessor adsheart adsignification adsignify adsmith adsmithing adsorb adsorbable adsorbate adsorbent adsorption adsorptive adstipulate adstipulation adstipulator adterminal adtevac adular adularescence adularia adulate adulation adulator adulatory adulatress Adullam Adullamite adult adulter adulterant adulterate adulterately adulterateness adulteration adulterator adulterer adulteress adulterine adulterize adulterous adulterously adultery adulthood adulticidal adulticide adultness adultoid adumbral adumbrant adumbrate adumbration adumbrative adumbratively adunc aduncate aduncated aduncity aduncous adusk adust adustion adustiosis Advaita advance advanceable advanced advancedness advancement advancer advancing advancingly advancive advantage advantageous advantageously advantageousness advection advectitious advective advehent advene advenience advenient Advent advential Adventism Adventist adventitia adventitious adventitiously adventitiousness adventive adventual adventure adventureful adventurement adventurer adventureship adventuresome adventuresomely adventuresomeness adventuress adventurish adventurous adventurously adventurousness adverb adverbial adverbiality adverbialize adverbially adverbiation adversant adversaria adversarious adversary adversative adversatively adverse adversely adverseness adversifoliate adversifolious adversity advert advertence advertency advertent advertently advertisable advertise advertisee advertisement advertiser advertising advice adviceful advisability advisable advisableness advisably advisal advisatory advise advised advisedly advisedness advisee advisement adviser advisership advisive advisiveness advisor advisorily advisory advocacy advocate advocateship advocatess advocation advocator advocatory advocatress advocatrice advocatrix advolution advowee advowson ady adynamia adynamic adynamy adyta adyton adytum adz adze adzer adzooks ae Aeacides Aeacus Aeaean Aechmophorus aecial Aecidiaceae aecidial aecidioform Aecidiomycetes aecidiospore aecidiostage aecidium aeciospore aeciostage aecioteliospore aeciotelium aecium aedeagus Aedes aedicula aedile aedileship aedilian aedilic aedilitian aedility aedoeagus aefald aefaldness aefaldy aefauld aegagropila aegagropile aegagrus Aegean aegerian aegeriid Aegeriidae Aegialitis aegicrania Aegina Aeginetan Aeginetic Aegipan aegirine aegirinolite aegirite aegis Aegisthus Aegithalos Aegithognathae aegithognathism aegithognathous Aegle Aegopodium aegrotant aegyptilla aegyrite aeluroid Aeluroidea aelurophobe aelurophobia aeluropodous aenach aenean aeneolithic aeneous aenigmatite aeolharmonica Aeolia Aeolian Aeolic Aeolicism aeolid Aeolidae Aeolididae aeolina aeoline aeolipile Aeolis Aeolism Aeolist aeolistic aeolodicon aeolodion aeolomelodicon aeolopantalon aeolotropic aeolotropism aeolotropy aeolsklavier aeon aeonial aeonian aeonist Aepyceros Aepyornis Aepyornithidae Aepyornithiformes Aequi Aequian Aequiculi Aequipalpia aequoreal aer aerage aerarian aerarium aerate aeration aerator aerenchyma aerenterectasia aerial aerialist aeriality aerially aerialness aeric aerical Aerides aerie aeried aerifaction aeriferous aerification aeriform aerify aero Aerobacter aerobate aerobatic aerobatics aerobe aerobian aerobic aerobically aerobiologic aerobiological aerobiologically aerobiologist aerobiology aerobion aerobiont aerobioscope aerobiosis aerobiotic aerobiotically aerobious aerobium aeroboat Aerobranchia aerobranchiate aerobus aerocamera aerocartograph Aerocharidae aerocolpos aerocraft aerocurve aerocyst aerodermectasia aerodone aerodonetic aerodonetics aerodrome aerodromics aerodynamic aerodynamical aerodynamicist aerodynamics aerodyne aeroembolism aeroenterectasia aerofoil aerogel aerogen aerogenes aerogenesis aerogenic aerogenically aerogenous aerogeologist aerogeology aerognosy aerogram aerograph aerographer aerographic aerographical aerographics aerography aerogun aerohydrodynamic aerohydropathy aerohydroplane aerohydrotherapy aerohydrous aeroides aerolite aerolith aerolithology aerolitic aerolitics aerologic aerological aerologist aerology aeromaechanic aeromancer aeromancy aeromantic aeromarine aeromechanical aeromechanics aerometeorograph aerometer aerometric aerometry aeromotor aeronat aeronaut aeronautic aeronautical aeronautically aeronautics aeronautism aeronef aeroneurosis aeropathy Aerope aeroperitoneum aeroperitonia aerophagia aerophagist aerophagy aerophane aerophilatelic aerophilatelist aerophilately aerophile aerophilic aerophilous aerophobia aerophobic aerophone aerophor aerophore aerophotography aerophysical aerophysics aerophyte aeroplane aeroplaner aeroplanist aeropleustic aeroporotomy aeroscepsis aeroscepsy aeroscope aeroscopic aeroscopically aeroscopy aerose aerosiderite aerosiderolite Aerosol aerosol aerosphere aerosporin aerostat aerostatic aerostatical aerostatics aerostation aerosteam aerotactic aerotaxis aerotechnical aerotherapeutics aerotherapy aerotonometer aerotonometric aerotonometry aerotropic aerotropism aeroyacht aeruginous aerugo aery aes Aeschylean Aeschynanthus Aeschynomene aeschynomenous Aesculaceae aesculaceous Aesculapian Aesculapius Aesculus Aesopian Aesopic aesthete aesthetic aesthetical aesthetically aesthetician aestheticism aestheticist aestheticize aesthetics aesthiology aesthophysiology Aestii aethalioid aethalium aetheogam aetheogamic aetheogamous aethered Aethionema aethogen aethrioscope Aethusa Aetian aetiogenic aetiotropic aetiotropically Aetobatidae Aetobatus Aetolian Aetomorphae aetosaur aetosaurian Aetosaurus aevia aface afaint Afar afar afara afear afeard afeared afebrile Afenil afernan afetal affa affability affable affableness affably affabrous affair affaite affect affectable affectate affectation affectationist affected affectedly affectedness affecter affectibility affectible affecting affectingly affection affectional affectionally affectionate affectionately affectionateness affectioned affectious affective affectively affectivity affeer affeerer affeerment affeir affenpinscher affenspalte afferent affettuoso affiance affiancer affiant affidation affidavit affidavy affiliable affiliate affiliation affinal affination affine affined affinely affinitative affinitatively affinite affinition affinitive affinity affirm affirmable affirmably affirmance affirmant affirmation affirmative affirmatively affirmatory affirmer affirmingly affix affixal affixation affixer affixion affixture afflation afflatus afflict afflicted afflictedness afflicter afflicting afflictingly affliction afflictionless afflictive afflictively affluence affluent affluently affluentness afflux affluxion afforce afforcement afford affordable afforest afforestable afforestation afforestment afformative affranchise affranchisement affray affrayer affreight affreighter affreightment affricate affricated affrication affricative affright affrighted affrightedly affrighter affrightful affrightfully affrightingly affrightment affront affronte affronted affrontedly affrontedness affronter affronting affrontingly affrontingness affrontive affrontiveness affrontment affuse affusion affy Afghan afghani afield Afifi afikomen afire aflagellar aflame aflare aflat aflaunt aflicker aflight afloat aflow aflower afluking aflush aflutter afoam afoot afore aforehand aforenamed aforesaid aforethought aforetime aforetimes afortiori afoul afraid afraidness Aframerican Afrasia Afrasian afreet afresh afret Afric African Africana Africanism Africanist Africanization Africanize Africanoid Africanthropus Afridi Afrikaans Afrikander Afrikanderdom Afrikanderism Afrikaner Afrogaea Afrogaean afront afrown Afshah Afshar aft aftaba after afteract afterage afterattack afterband afterbeat afterbirth afterblow afterbody afterbrain afterbreach afterbreast afterburner afterburning aftercare aftercareer aftercast aftercataract aftercause afterchance afterchrome afterchurch afterclap afterclause aftercome aftercomer aftercoming aftercooler aftercost aftercourse aftercrop aftercure afterdamp afterdate afterdays afterdeck afterdinner afterdrain afterdrops aftereffect afterend aftereye afterfall afterfame afterfeed afterfermentation afterform afterfriend afterfruits afterfuture aftergame aftergas afterglide afterglow aftergo aftergood aftergrass aftergrave aftergrief aftergrind aftergrowth afterguard afterguns afterhand afterharm afterhatch afterhelp afterhend afterhold afterhope afterhours afterimage afterimpression afterings afterking afterknowledge afterlife afterlifetime afterlight afterloss afterlove aftermark aftermarriage aftermass aftermast aftermath aftermatter aftermeal aftermilk aftermost afternight afternoon afternoons afternose afternote afteroar afterpain afterpart afterpast afterpeak afterpiece afterplanting afterplay afterpressure afterproof afterrake afterreckoning afterrider afterripening afterroll afterschool aftersend aftersensation aftershaft aftershafted aftershine aftership aftershock aftersong aftersound afterspeech afterspring afterstain afterstate afterstorm afterstrain afterstretch afterstudy afterswarm afterswarming afterswell aftertan aftertask aftertaste afterthinker afterthought afterthoughted afterthrift aftertime aftertimes aftertouch aftertreatment aftertrial afterturn aftervision afterwale afterwar afterward afterwards afterwash afterwhile afterwisdom afterwise afterwit afterwitted afterwork afterworking afterworld afterwrath afterwrist aftmost Aftonian aftosa aftward aftwards afunction afunctional afwillite Afzelia aga agabanee agacante agacella Agaces Agade Agag again against againstand agal agalactia agalactic agalactous agalawood agalaxia agalaxy Agalena Agalenidae Agalinis agalite agalloch agallochum agallop agalma agalmatolite agalwood Agama agama Agamae Agamemnon agamete agami agamian agamic agamically agamid Agamidae agamobium agamogenesis agamogenetic agamogenetically agamogony agamoid agamont agamospore agamous agamy aganglionic Aganice Aganippe Agao Agaonidae Agapanthus agape Agapemone Agapemonian Agapemonist Agapemonite agapetae agapeti agapetid Agapetidae Agapornis agar agaric agaricaceae agaricaceous Agaricales agaricic agariciform agaricin agaricine agaricoid Agaricus Agaristidae agarita Agarum agarwal agasp Agastache Agastreae agastric agastroneuria agate agateware Agatha Agathaea Agathaumas agathin Agathis agathism agathist agathodaemon agathodaemonic agathokakological agathology Agathosma agatiferous agatiform agatine agatize agatoid agaty Agau Agave agavose Agawam Agaz agaze agazed Agdistis age aged agedly agedness agee Agelacrinites Agelacrinitidae Agelaius Agelaus ageless agelessness agelong agen Agena agency agenda agendum agenesia agenesic agenesis agennetic agent agentess agential agentival agentive agentry agentship ageometrical ager Ageratum ageusia ageusic ageustia agger aggerate aggeration aggerose Aggie agglomerant agglomerate agglomerated agglomeratic agglomeration agglomerative agglomerator agglutinability agglutinable agglutinant agglutinate agglutination agglutinationist agglutinative agglutinator agglutinin agglutinize agglutinogen agglutinogenic agglutinoid agglutinoscope agglutogenic aggradation aggradational aggrade aggrandizable aggrandize aggrandizement aggrandizer aggrate aggravate aggravating aggravatingly aggravation aggravative aggravator aggregable aggregant Aggregata Aggregatae aggregate aggregately aggregateness aggregation aggregative aggregator aggregatory aggress aggressin aggression aggressionist aggressive aggressively aggressiveness aggressor aggrievance aggrieve aggrieved aggrievedly aggrievedness aggrievement aggroup aggroupment aggry aggur agha Aghan aghanee aghast aghastness Aghlabite Aghorapanthi Aghori Agialid Agib Agiel agilawood agile agilely agileness agility agillawood aging agio agiotage agist agistator agistment agistor agitable agitant agitate agitatedly agitation agitational agitationist agitative agitator agitatorial agitatrix agitprop Agkistrodon agla Aglaia aglance Aglaonema Aglaos aglaozonia aglare Aglaspis Aglauros agleaf agleam aglet aglethead agley aglimmer aglint Aglipayan Aglipayano aglitter aglobulia Aglossa aglossal aglossate aglossia aglow aglucon aglutition aglycosuric Aglypha aglyphodont Aglyphodonta Aglyphodontia aglyphous agmatine agmatology agminate agminated agnail agname agnamed agnate Agnatha agnathia agnathic Agnathostomata agnathostomatous agnathous agnatic agnatically agnation agnel Agnes agnification agnize Agnoetae Agnoete Agnoetism agnoiology Agnoite agnomen agnomical agnominal agnomination agnosia agnosis agnostic agnostically agnosticism Agnostus agnosy Agnotozoic agnus ago agog agoge agogic agogics agoho agoing agomensin agomphiasis agomphious agomphosis agon agonal agone agoniada agoniadin agoniatite Agoniatites agonic agonied agonist Agonista agonistarch agonistic agonistically agonistics agonium agonize agonizedly agonizer agonizingly Agonostomus agonothete agonothetic agony agora agoranome agoraphobia agouara agouta agouti agpaite agpaitic Agra agraffee agrah agral agrammatical agrammatism Agrania agranulocyte agranulocytosis agranuloplastic Agrapha agraphia agraphic agrarian agrarianism agrarianize agrarianly Agrauleum agre agree agreeability agreeable agreeableness agreeably agreed agreeing agreeingly agreement agreer agregation agrege agrestal agrestial agrestian agrestic agria agricere agricole agricolist agricolite agricolous agricultor agricultural agriculturalist agriculturally agriculture agriculturer agriculturist Agrilus Agrimonia agrimony agrimotor agrin Agriochoeridae Agriochoerus agriological agriologist agriology Agrionia agrionid Agrionidae Agriotes Agriotypidae Agriotypus agrise agrito agroan agrobiologic agrobiological agrobiologically agrobiologist agrobiology agrogeological agrogeologically agrogeology agrologic agrological agrologically agrology agrom Agromyza agromyzid Agromyzidae agronome agronomial agronomic agronomical agronomics agronomist agronomy agroof agrope Agropyron Agrostemma agrosteral Agrostis agrostographer agrostographic agrostographical agrostography agrostologic agrostological agrostologist agrostology agrotechny Agrotis aground agrufe agruif agrypnia agrypnotic agsam agua aguacate Aguacateca aguavina Agudist ague aguelike agueproof agueweed aguey aguilarite aguilawood aguinaldo aguirage aguish aguishly aguishness agunah agush agust agy Agyieus agynarious agynary agynous agyrate agyria Ah ah aha ahaaina ahankara Ahantchuyuk ahartalav ahaunch ahead aheap ahem Ahepatokla Ahet ahey ahimsa ahind ahint Ahir ahluwalia ahmadi Ahmadiya Ahnfeltia aho Ahom ahong ahorse ahorseback Ahousaht ahoy Ahrendahronon Ahriman Ahrimanian ahsan Aht ahu ahuatle ahuehuete ahull ahum ahungered ahungry ahunt ahura ahush ahwal ahypnia ai Aias Aiawong aichmophobia aid aidable aidance aidant aide Aidenn aider Aides aidful aidless aiel aigialosaur Aigialosauridae Aigialosaurus aiglet aigremore aigrette aiguille aiguillesque aiguillette aiguilletted aikinite ail ailantery ailanthic Ailanthus ailantine ailanto aile Aileen aileron ailette Ailie ailing aillt ailment ailsyte Ailuridae ailuro ailuroid Ailuroidea Ailuropoda Ailuropus Ailurus ailweed aim Aimak aimara Aimee aimer aimful aimfully aiming aimless aimlessly aimlessness Aimore aimworthiness ainaleh ainhum ainoi ainsell aint Ainu aion aionial air Aira airable airampo airan airbound airbrained airbrush aircraft aircraftman aircraftsman aircraftswoman aircraftwoman aircrew aircrewman airdock airdrome airdrop aire Airedale airedale airer airfield airfoil airframe airfreight airfreighter airgraphics airhead airiferous airified airily airiness airing airish airless airlift airlike airliner airmail airman airmanship airmark airmarker airmonger airohydrogen airometer airpark airphobia airplane airplanist airport airproof airscape airscrew airship airsick airsickness airstrip airt airtight airtightly airtightness airward airwards airway airwayman airwoman airworthiness airworthy airy aischrolatreia aiseweed aisle aisled aisleless aisling Aissaoua Aissor aisteoir Aistopoda Aistopodes ait aitch aitchbone aitchless aitchpiece aitesis aithochroi aition aitiotropic Aitkenite Aitutakian aiwan Aix aizle Aizoaceae aizoaceous Aizoon Ajaja ajaja ajangle ajar ajari Ajatasatru ajava ajhar ajivika ajog ajoint ajowan Ajuga ajutment ak Aka aka Akal akala Akali akalimba akamatsu Akamnik Akan Akanekunik Akania Akaniaceae akaroa akasa Akawai akazga akazgine akcheh ake akeake akebi Akebia akee akeki akeley akenobeite akepiro akerite akey Akha Akhissar Akhlame Akhmimic akhoond akhrot akhyana akia Akim akimbo akin akindle akinesia akinesic akinesis akinete akinetic Akiskemikinik Akiyenik Akka Akkad Akkadian Akkadist akmudar akmuddar aknee ako akoasm akoasma akoluthia akonge Akontae Akoulalion akov akpek Akra akra Akrabattine akroasis akrochordite akroterion Aktistetae Aktistete Aktivismus Aktivist aku akuammine akule akund Akwapim Al al ala Alabama Alabaman Alabamian alabamide alabamine alabandite alabarch alabaster alabastos alabastrian alabastrine alabastrites alabastron alabastrum alacha alack alackaday alacreatine alacreatinine alacrify alacritous alacrity Alactaga alada Aladdin Aladdinize Aladfar Aladinist alaihi alaite Alaki Alala alala alalite alalonga alalunga alalus Alamanni Alamannian Alamannic alameda alamo alamodality alamonti alamosite alamoth Alan alan aland Alangiaceae alangin alangine Alangium alani alanine alannah Alans alantic alantin alantol alantolactone alantolic alanyl alar Alarbus alares Alaria Alaric alarm alarmable alarmed alarmedly alarming alarmingly alarmism alarmist Alarodian alarum alary alas Alascan Alaska alaskaite Alaskan alaskite Alaster alastrim alate alated alatern alaternus alation Alauda Alaudidae alaudine Alaunian Alawi Alb alb alba albacore albahaca Albainn Alban alban Albanenses Albanensian Albania Albanian albanite Albany albarco albardine albarello albarium albaspidin albata Albatros albatross albe albedo albedograph albee albeit Alberene Albert Alberta albertin Albertina Albertine Albertinian Albertist albertite albertustaler albertype albescence albescent albespine albetad Albi Albian albicans albicant albication albiculi albification albificative albiflorous albify Albigenses Albigensian Albigensianism Albin albinal albiness albinic albinism albinistic albino albinoism albinotic albinuria Albion Albireo albite albitic albitite albitization albitophyre Albizzia albocarbon albocinereous Albococcus albocracy Alboin albolite albolith albopannin albopruinose alboranite Albrecht Albright albronze Albruna Albuca Albuginaceae albuginea albugineous albuginitis albugo album albumean albumen albumenization albumenize albumenizer albumimeter albumin albuminate albuminaturia albuminiferous albuminiform albuminimeter albuminimetry albuminiparous albuminization albuminize albuminocholia albuminofibrin albuminogenous albuminoid albuminoidal albuminolysis albuminometer albuminometry albuminone albuminorrhea albuminoscope albuminose albuminosis albuminous albuminousness albuminuria albuminuric albumoid albumoscope albumose albumosuria alburn alburnous alburnum albus albutannin Albyn Alca Alcaaba Alcae Alcaic alcaide alcalde alcaldeship alcaldia Alcaligenes alcalizate Alcalzar alcamine alcanna Alcantara Alcantarines alcarraza alcatras alcazar Alcedines Alcedinidae Alcedininae Alcedo alcelaphine Alcelaphus Alces alchemic alchemical alchemically Alchemilla alchemist alchemistic alchemistical alchemistry alchemize alchemy alchera alcheringa alchimy alchitran alchochoden Alchornea alchymy Alcibiadean Alcicornium Alcidae alcidine alcine Alcippe alclad alco alcoate alcogel alcogene alcohate alcohol alcoholate alcoholature alcoholdom alcoholemia alcoholic alcoholically alcoholicity alcoholimeter alcoholism alcoholist alcoholizable alcoholization alcoholize alcoholmeter alcoholmetric alcoholomania alcoholometer alcoholometric alcoholometrical alcoholometry alcoholophilia alcoholuria alcoholysis alcoholytic Alcor Alcoran Alcoranic Alcoranist alcornoco alcornoque alcosol Alcotate alcove alcovinometer Alcuinian alcyon Alcyonacea alcyonacean Alcyonaria alcyonarian Alcyone Alcyones Alcyoniaceae alcyonic alcyoniform Alcyonium alcyonoid aldamine aldane aldazin aldazine aldeament Aldebaran aldebaranium aldehol aldehydase aldehyde aldehydic aldehydine aldehydrol alder Alderamin alderman aldermanate aldermancy aldermaness aldermanic aldermanical aldermanity aldermanlike aldermanly aldermanry aldermanship aldern Alderney alderwoman Aldhafara Aldhafera aldim aldime aldimine Aldine aldine aldoheptose aldohexose aldoketene aldol aldolization aldolize aldononose aldopentose aldose aldoside aldoxime Aldrovanda Aldus ale Alea aleak aleatory alebench aleberry Alebion alec alecithal alecize Aleck aleconner alecost Alectoria alectoria Alectorides alectoridine alectorioid Alectoris alectoromachy alectoromancy Alectoromorphae alectoromorphous Alectoropodes alectoropodous Alectrion Alectrionidae alectryomachy alectryomancy Alectryon alecup alee alef alefnull aleft alefzero alegar alehoof alehouse alem alemana Alemanni Alemannian Alemannic Alemannish alembic alembicate alembroth Alemite alemite alemmal alemonger alen Alencon Aleochara aleph alephs alephzero alepidote alepole alepot Aleppine Aleppo alerce alerse alert alertly alertness alesan alestake aletap aletaster Alethea alethiology alethopteis alethopteroid alethoscope aletocyte Aletris alette aleukemic Aleurites aleuritic Aleurobius Aleurodes Aleurodidae aleuromancy aleurometer aleuronat aleurone aleuronic aleuroscope Aleut Aleutian Aleutic aleutite alevin alewife Alexander alexanders Alexandra Alexandreid Alexandrian Alexandrianism Alexandrina Alexandrine alexandrite Alexas Alexia alexia Alexian alexic alexin alexinic alexipharmacon alexipharmacum alexipharmic alexipharmical alexipyretic Alexis alexiteric alexiterical Alexius aleyard Aleyrodes aleyrodid Aleyrodidae Alf alf alfa alfaje alfalfa alfaqui alfaquin alfenide alfet alfilaria alfileria alfilerilla alfilerillo alfiona Alfirk alfonsin alfonso alforja Alfred Alfreda alfresco alfridaric alfridary Alfur Alfurese Alfuro alga algae algaecide algaeological algaeologist algaeology algaesthesia algaesthesis algal algalia Algaroth algarroba algarrobilla algarrobin Algarsife Algarsyf algate Algebar algebra algebraic algebraical algebraically algebraist algebraization algebraize Algedi algedo algedonic algedonics algefacient Algenib Algerian Algerine algerine Algernon algesia algesic algesis algesthesis algetic Algic algic algid algidity algidness Algieba algific algin alginate algine alginic alginuresis algiomuscular algist algivorous algocyan algodoncillo algodonite algoesthesiometer algogenic algoid Algol algolagnia algolagnic algolagnist algolagny algological algologist algology Algoman algometer algometric algometrical algometrically algometry Algomian Algomic Algonkian Algonquian Algonquin algophilia algophilist algophobia algor Algorab Algores algorism algorismic algorist algoristic algorithm algorithmic algosis algous algovite algraphic algraphy alguazil algum Algy Alhagi Alhambra Alhambraic Alhambresque Alhena alhenna alias Alibamu alibangbang alibi alibility alible Alicant Alice alichel Alichino Alicia Alick alicoche alictisal alicyclic Alida alidade Alids alien alienability alienable alienage alienate alienation alienator aliency alienee aliener alienicola alienigenate alienism alienist alienize alienor alienship aliethmoid aliethmoidal alif aliferous aliform aligerous alight align aligner alignment aligreek aliipoe alike alikeness alikewise Alikuluf Alikulufan alilonghi alima aliment alimental alimentally alimentariness alimentary alimentation alimentative alimentatively alimentativeness alimenter alimentic alimentive alimentiveness alimentotherapy alimentum alimonied alimony alin alinasal Aline alineation alintatao aliofar Alioth alipata aliped aliphatic alipterion aliptes aliptic aliquant aliquot aliseptal alish alisier Alisma Alismaceae alismaceous alismad alismal Alismales Alismataceae alismoid aliso Alison alison alisonite alisp alisphenoid alisphenoidal alist Alister alit alite alitrunk aliturgic aliturgical aliunde alive aliveness alivincular Alix aliyah alizarate alizari alizarin aljoba alk alkahest alkahestic alkahestica alkahestical Alkaid alkalamide alkalemia alkalescence alkalescency alkalescent alkali alkalic alkaliferous alkalifiable alkalify alkaligen alkaligenous alkalimeter alkalimetric alkalimetrical alkalimetrically alkalimetry alkaline alkalinity alkalinization alkalinize alkalinuria alkalizable alkalizate alkalization alkalize alkalizer alkaloid alkaloidal alkalometry alkalosis alkalous Alkalurops alkamin alkamine alkane alkanet Alkanna alkannin Alkaphrah alkapton alkaptonuria alkaptonuric alkargen alkarsin alkekengi alkene alkenna alkenyl alkermes Alkes alkide alkine alkool Alkoran Alkoranic alkoxide alkoxy alkoxyl alky alkyd alkyl alkylamine alkylate alkylation alkylene alkylic alkylidene alkylize alkylogen alkyloxy alkyne allabuta allactite allaeanthus allagite allagophyllous allagostemonous Allah allalinite Allamanda allamotti allan allanite allanitic allantiasis allantochorion allantoic allantoid allantoidal Allantoidea allantoidean allantoidian allantoin allantoinase allantoinuria allantois allantoxaidin allanturic Allasch allassotonic allative allatrate allay allayer allayment allbone Alle allecret allectory allegate allegation allegator allege allegeable allegedly allegement alleger Alleghenian Allegheny allegiance allegiancy allegiant allegoric allegorical allegorically allegoricalness allegorism allegorist allegorister allegoristic allegorization allegorize allegorizer allegory allegretto allegro allele allelic allelism allelocatalytic allelomorph allelomorphic allelomorphism allelotropic allelotropism allelotropy alleluia alleluiatic allemand allemande allemontite allenarly allene Allentiac Allentiacan aller allergen allergenic allergia allergic allergin allergist allergy allerion allesthesia alleviate alleviatingly alleviation alleviative alleviator alleviatory alley alleyed alleyite alleyway allgood Allhallow Allhallowtide allheal alliable alliably Alliaceae alliaceous alliance alliancer Alliaria allicampane allice allicholly alliciency allicient Allie allied Allies allies alligate alligator alligatored allineate allineation Allionia Allioniaceae allision alliteral alliterate alliteration alliterational alliterationist alliterative alliteratively alliterativeness alliterator Allium allivalite allmouth allness Allobroges allocable allocaffeine allocatable allocate allocatee allocation allocator allochetia allochetite allochezia allochiral allochirally allochiria allochlorophyll allochroic allochroite allochromatic allochroous allochthonous allocinnamic alloclase alloclasite allocochick allocrotonic allocryptic allocute allocution allocutive allocyanine allodelphite allodesmism alloeosis alloeostropha alloeotic alloerotic alloerotism allogamous allogamy allogene allogeneity allogeneous allogenic allogenically allograph alloiogenesis alloisomer alloisomeric alloisomerism allokinesis allokinetic allokurtic allomerism allomerous allometric allometry allomorph allomorphic allomorphism allomorphite allomucic allonomous allonym allonymous allopalladium allopath allopathetic allopathetically allopathic allopathically allopathist allopathy allopatric allopatrically allopatry allopelagic allophanamide allophanates allophane allophanic allophone allophyle allophylian allophylic Allophylus allophytoid alloplasm alloplasmatic alloplasmic alloplast alloplastic alloplasty alloploidy allopolyploid allopsychic alloquial alloquialism alloquy allorhythmia allorrhyhmia allorrhythmic allosaur Allosaurus allose allosematic allosome allosyndesis allosyndetic allot allotee allotelluric allotheism Allotheria allothigene allothigenetic allothigenetically allothigenic allothigenous allothimorph allothimorphic allothogenic allothogenous allotment allotriodontia Allotriognathi allotriomorphic allotriophagia allotriophagy allotriuria allotrope allotrophic allotropic allotropical allotropically allotropicity allotropism allotropize allotropous allotropy allotrylic allottable allottee allotter allotype allotypical allover allow allowable allowableness allowably allowance allowedly allower alloxan alloxanate alloxanic alloxantin alloxuraemia alloxuremia alloxuric alloxyproteic alloy alloyage allozooid allseed allspice allthing allthorn alltud allude allure allurement allurer alluring alluringly alluringness allusion allusive allusively allusiveness alluvia alluvial alluviate alluviation alluvion alluvious alluvium allwhere allwhither allwork Allworthy Ally ally allyl allylamine allylate allylation allylene allylic allylthiourea Alma alma Almach almaciga almacigo almadia almadie almagest almagra Almain Alman almanac almandine almandite alme almeidina almemar Almerian almeriite Almida almightily almightiness almighty almique Almira almirah almochoden Almohad Almohade Almohades almoign Almon almon almond almondy almoner almonership almonry Almoravid Almoravide Almoravides almost almous alms almsdeed almsfolk almsful almsgiver almsgiving almshouse almsman almswoman almucantar almuce almud almude almug Almuredin almuten aln alnage alnager alnagership Alnaschar Alnascharism alnein alnico Alnilam alniresinol Alnitak Alnitham alniviridol alnoite alnuin Alnus alo Aloadae Alocasia alochia alod alodial alodialism alodialist alodiality alodially alodian alodiary alodification alodium alody aloe aloed aloelike aloemodin aloeroot aloesol aloeswood aloetic aloetical aloewood aloft alogia Alogian alogical alogically alogism alogy aloid aloin Alois aloisiite aloma alomancy alone aloneness along alongshore alongshoreman alongside alongst Alonso Alonsoa Alonzo aloof aloofly aloofness aloose alop alopecia Alopecias alopecist alopecoid Alopecurus alopeke Alopias Alopiidae Alosa alose Alouatta alouatte aloud alow alowe Aloxite Aloysia Aloysius alp alpaca alpasotes Alpax alpeen Alpen alpenglow alpenhorn alpenstock alpenstocker alpestral alpestrian alpestrine alpha alphabet alphabetarian alphabetic alphabetical alphabetically alphabetics alphabetiform alphabetism alphabetist alphabetization alphabetize alphabetizer Alphard alphatoluic Alphean Alphecca alphenic Alpheratz alphitomancy alphitomorphous alphol Alphonist Alphonse Alphonsine Alphonsism Alphonso alphorn alphos alphosis alphyl Alpian Alpid alpieu alpigene Alpine alpine alpinely alpinery alpinesque Alpinia Alpiniaceae Alpinism Alpinist alpist Alpujarra alqueire alquier alquifou alraun alreadiness already alright alrighty alroot alruna Alsatia Alsatian alsbachite Alshain Alsinaceae alsinaceous Alsine also alsoon Alsophila Alstonia alstonidine alstonine alstonite Alstroemeria alsweill alt Altaian Altaic Altaid Altair altaite Altamira altar altarage altared altarist altarlet altarpiece altarwise altazimuth alter alterability alterable alterableness alterably alterant alterate alteration alterative altercate altercation altercative alteregoism alteregoistic alterer alterity altern alternacy alternance alternant Alternanthera Alternaria alternariose alternate alternately alternateness alternating alternatingly alternation alternationist alternative alternatively alternativeness alternativity alternator alterne alternifoliate alternipetalous alternipinnate alternisepalous alternize alterocentric Althaea althaein Althea althea althein altheine althionic altho althorn although Altica Alticamelus altigraph altilik altiloquence altiloquent altimeter altimetrical altimetrically altimetry altin altincar Altingiaceae altingiaceous altininck altiplano altiscope altisonant altisonous altissimo altitude altitudinal altitudinarian alto altogether altogetherness altometer altoun altrices altricial altropathy altrose altruism altruist altruistic altruistically altschin altun Aluco Aluconidae Aluconinae aludel Aludra alula alular alulet Alulim alum alumbloom Alumel alumic alumiferous alumina aluminaphone aluminate alumine aluminic aluminide aluminiferous aluminiform aluminish aluminite aluminium aluminize aluminoferric aluminographic aluminography aluminose aluminosilicate aluminosis aluminosity aluminothermic aluminothermics aluminothermy aluminotype aluminous aluminum aluminyl alumish alumite alumium alumna alumnae alumnal alumni alumniate Alumnol alumnus alumohydrocalcite alumroot Alundum aluniferous alunite alunogen alupag Alur alure alurgite alushtite aluta alutaceous Alvah Alvan alvar alvearium alveary alveloz alveola alveolar alveolariform alveolary alveolate alveolated alveolation alveole alveolectomy alveoli alveoliform alveolite Alveolites alveolitis alveoloclasia alveolocondylean alveolodental alveololabial alveololingual alveolonasal alveolosubnasal alveolotomy alveolus alveus alviducous Alvin Alvina alvine Alvissmal alvite alvus alway always aly Alya alycompaine alymphia alymphopotent alypin alysson Alyssum alytarch Alytes am ama amaas Amabel amability amacratic amacrinal amacrine amadavat amadelphous Amadi Amadis amadou Amaethon Amafingo amaga amah Amahuaca amain amaister amakebe Amakosa amala amalaita amalaka Amalfian Amalfitan amalgam amalgamable amalgamate amalgamation amalgamationist amalgamative amalgamatize amalgamator amalgamist amalgamization amalgamize Amalings Amalrician amaltas amamau Amampondo Amanda amandin Amandus amang amani amania Amanist Amanita amanitin amanitine Amanitopsis amanori amanous amantillo amanuenses amanuensis amapa Amapondo amar Amara Amarantaceae amarantaceous amaranth Amaranthaceae amaranthaceous amaranthine amaranthoid Amaranthus amarantite Amarantus amarelle amarevole amargoso amarillo amarin amarine amaritude amarity amaroid amaroidal amarthritis amaryllid Amaryllidaceae amaryllidaceous amaryllideous Amaryllis amasesis amass amassable amasser amassment Amasta amasthenic amastia amasty Amatembu amaterialistic amateur amateurish amateurishly amateurishness amateurism amateurship Amati amative amatively amativeness amatol amatorial amatorially amatorian amatorious amatory amatrice amatungula amaurosis amaurotic amaze amazed amazedly amazedness amazeful amazement amazia Amazilia amazing amazingly Amazon Amazona Amazonian Amazonism amazonite Amazulu amba ambage ambagiosity ambagious ambagiously ambagiousness ambagitory ambalam amban ambar ambaree ambarella ambary ambash ambassade Ambassadeur ambassador ambassadorial ambassadorially ambassadorship ambassadress ambassage ambassy ambatch ambatoarinite ambay ambeer amber amberfish ambergris amberiferous amberite amberoid amberous ambery ambicolorate ambicoloration ambidexter ambidexterity ambidextral ambidextrous ambidextrously ambidextrousness ambience ambiency ambiens ambient ambier ambigenous ambiguity ambiguous ambiguously ambiguousness ambilateral ambilateralaterally ambilaterality ambilevous ambilian ambilogy ambiopia ambiparous ambisinister ambisinistrous ambisporangiate ambisyllabic ambit ambital ambitendency ambition ambitionist ambitionless ambitionlessly ambitious ambitiously ambitiousness ambitty ambitus ambivalence ambivalency ambivalent ambivert amble ambler ambling amblingly amblotic amblyacousia amblyaphia Amblycephalidae Amblycephalus amblychromatic Amblydactyla amblygeusia amblygon amblygonal amblygonite amblyocarpous Amblyomma amblyope amblyopia amblyopic Amblyopsidae Amblyopsis amblyoscope amblypod Amblypoda amblypodous Amblyrhynchus amblystegite Amblystoma ambo amboceptoid amboceptor Ambocoelia Amboina Amboinese ambomalleal ambon ambonite Ambonnay ambos ambosexous ambosexual ambrain ambrein ambrette Ambrica ambrite ambroid ambrology Ambrose ambrose ambrosia ambrosiac Ambrosiaceae ambrosiaceous ambrosial ambrosially Ambrosian ambrosian ambrosiate ambrosin ambrosine Ambrosio ambrosterol ambrotype ambry ambsace ambulacral ambulacriform ambulacrum ambulance ambulancer ambulant ambulate ambulatio ambulation ambulative ambulator Ambulatoria ambulatorial ambulatorium ambulatory ambuling ambulomancy amburbial ambury ambuscade ambuscader ambush ambusher ambushment Ambystoma Ambystomidae amchoor ame amebiform ameed ameen Ameiuridae Ameiurus Ameiva Amelanchier amelcorn Amelia amelia amelification ameliorable ameliorableness ameliorant ameliorate amelioration ameliorativ ameliorative ameliorator amellus ameloblast ameloblastic amelu amelus Amen amen amenability amenable amenableness amenably amend amendable amendableness amendatory amende amender amendment amends amene amenia Amenism Amenite amenity amenorrhea amenorrheal amenorrheic amenorrhoea ament amentaceous amental amentia Amentiferae amentiferous amentiform amentulum amentum amerce amerceable amercement amercer amerciament America American Americana Americanese Americanism Americanist Americanistic Americanitis Americanization Americanize Americanizer Americanly Americanoid Americaward Americawards americium Americomania Americophobe Amerimnon Amerind Amerindian Amerindic amerism ameristic amesite Ametabola ametabole ametabolia ametabolian ametabolic ametabolism ametabolous ametaboly ametallous amethodical amethodically amethyst amethystine ametoecious ametria ametrometer ametrope ametropia ametropic ametrous Amex amgarn amhar amherstite amhran ami Amia amiability amiable amiableness amiably amianth amianthiform amianthine Amianthium amianthoid amianthoidal amianthus amic amicability amicable amicableness amicably amical amice amiced amicicide amicrobic amicron amicronucleate amid amidase amidate amidation amide amidic amidid amidide amidin amidine Amidism Amidist amido amidoacetal amidoacetic amidoacetophenone amidoaldehyde amidoazo amidoazobenzene amidoazobenzol amidocaffeine amidocapric amidofluorid amidofluoride amidogen amidoguaiacol amidohexose amidoketone amidol amidomyelin amidon amidophenol amidophosphoric amidoplast amidoplastid amidopyrine amidosuccinamic amidosulphonal amidothiazole amidoxime amidoxy amidoxyl amidrazone amidship amidships amidst amidstream amidulin Amiidae amil Amiles Amiloun amimia amimide amin aminate amination amine amini aminic aminity aminization aminize amino aminoacetal aminoacetanilide aminoacetic aminoacetone aminoacetophenetidine aminoacetophenone aminoacidemia aminoaciduria aminoanthraquinone aminoazobenzene aminobarbituric aminobenzaldehyde aminobenzamide aminobenzene aminobenzoic aminocaproic aminodiphenyl aminoethionic aminoformic aminogen aminoglutaric aminoguanidine aminoid aminoketone aminolipin aminolysis aminolytic aminomalonic aminomyelin aminophenol aminoplast aminoplastic aminopropionic aminopurine aminopyrine aminoquinoline aminosis aminosuccinamic aminosulphonic aminothiophen aminovaleric aminoxylol Aminta Amintor Amioidei amir Amiranha amiray amirship Amish Amishgo amiss amissibility amissible amissness Amita Amitabha amitosis amitotic amitotically amity amixia Amizilis amla amli amlikar amlong Amma amma amman Ammanite ammelide ammelin ammeline ammer ammeter Ammi Ammiaceae ammiaceous ammine amminochloride amminolysis amminolytic ammiolite ammo Ammobium ammochaeta ammochryse ammocoete ammocoetes ammocoetid Ammocoetidae ammocoetiform ammocoetoid Ammodytes Ammodytidae ammodytoid ammonal ammonate ammonation Ammonea ammonia ammoniacal ammoniacum ammoniate ammoniation ammonic ammonical ammoniemia ammonification ammonifier ammonify ammoniojarosite ammonion ammonionitrate Ammonite ammonite Ammonites Ammonitess ammonitic ammoniticone ammonitiferous Ammonitish ammonitoid Ammonitoidea ammonium ammoniuria ammonization ammono ammonobasic ammonocarbonic ammonocarbonous ammonoid Ammonoidea ammonoidean ammonolysis ammonolytic ammonolyze Ammophila ammophilous ammoresinol ammotherapy ammu ammunition amnemonic amnesia amnesic amnestic amnesty amniac amniatic amnic Amnigenia amnioallantoic amniochorial amnioclepsis amniomancy amnion Amnionata amnionate amnionic amniorrhea Amniota amniote amniotitis amniotome amober amobyr amoeba amoebae Amoebaea amoebaean amoebaeum amoebalike amoeban amoebian amoebiasis amoebic amoebicide amoebid Amoebida Amoebidae amoebiform Amoebobacter Amoebobacterieae amoebocyte Amoebogeniae amoeboid amoeboidism amoebous amoebula amok amoke amole amolilla amomal Amomales Amomis amomum among amongst amontillado amor amorado amoraic amoraim amoral amoralism amoralist amorality amoralize Amores amoret amoretto Amoreuxia amorism amorist amoristic Amorite Amoritic Amoritish amorosity amoroso amorous amorously amorousness Amorpha amorphia amorphic amorphinism amorphism Amorphophallus amorphophyte amorphotae amorphous amorphously amorphousness amorphus amorphy amort amortisseur amortizable amortization amortize amortizement Amorua Amos Amoskeag amotion amotus amount amour amourette amovability amovable amove Amoy Amoyan Amoyese ampalaya ampalea ampangabeite ampasimenite Ampelidaceae ampelidaceous Ampelidae ampelideous Ampelis ampelite ampelitic ampelographist ampelography ampelopsidin ampelopsin Ampelopsis Ampelosicyos ampelotherapy amper amperage ampere amperemeter Amperian amperometer ampersand ampery amphanthium ampheclexis ampherotokous ampherotoky amphetamine amphiarthrodial amphiarthrosis amphiaster amphibalus Amphibia amphibial amphibian amphibichnite amphibiety amphibiological amphibiology amphibion amphibiotic Amphibiotica amphibious amphibiously amphibiousness amphibium amphiblastic amphiblastula amphiblestritis Amphibola amphibole amphibolia amphibolic amphiboliferous amphiboline amphibolite amphibolitic amphibological amphibologically amphibologism amphibology amphibolous amphiboly amphibrach amphibrachic amphibryous Amphicarpa Amphicarpaea amphicarpic amphicarpium amphicarpogenous amphicarpous amphicentric amphichroic amphichrom amphichromatic amphichrome amphicoelian amphicoelous Amphicondyla amphicondylous amphicrania amphicreatinine amphicribral amphictyon amphictyonian amphictyonic amphictyony Amphicyon Amphicyonidae amphicyrtic amphicyrtous amphicytula amphid amphide amphidesmous amphidetic amphidiarthrosis amphidiploid amphidiploidy amphidisc Amphidiscophora amphidiscophoran amphierotic amphierotism Amphigaea amphigam Amphigamae amphigamous amphigastrium amphigastrula amphigean amphigen amphigene amphigenesis amphigenetic amphigenous amphigenously amphigonic amphigonium amphigonous amphigony amphigoric amphigory amphigouri amphikaryon amphilogism amphilogy amphimacer amphimictic amphimictical amphimictically amphimixis amphimorula Amphinesian Amphineura amphineurous amphinucleus Amphion Amphionic Amphioxi Amphioxidae Amphioxides Amphioxididae amphioxus amphipeptone amphiphloic amphiplatyan Amphipleura amphiploid amphiploidy amphipneust Amphipneusta amphipneustic Amphipnous amphipod Amphipoda amphipodal amphipodan amphipodiform amphipodous amphiprostylar amphiprostyle amphiprotic amphipyrenin Amphirhina amphirhinal amphirhine amphisarca amphisbaena amphisbaenian amphisbaenic Amphisbaenidae amphisbaenoid amphisbaenous amphiscians amphiscii Amphisile Amphisilidae amphispermous amphisporangiate amphispore Amphistoma amphistomatic amphistome amphistomoid amphistomous Amphistomum amphistylar amphistylic amphistyly amphitene amphitheater amphitheatered amphitheatral amphitheatric amphitheatrical amphitheatrically amphithecial amphithecium amphithect amphithyron amphitokal amphitokous amphitoky amphitriaene amphitrichous Amphitrite amphitropal amphitropous Amphitruo Amphitryon Amphiuma Amphiumidae amphivasal amphivorous Amphizoidae amphodarch amphodelite amphodiplopia amphogenous ampholyte amphopeptone amphophil amphophile amphophilic amphophilous amphora amphoral amphore amphorette amphoric amphoricity amphoriloquy amphorophony amphorous amphoteric Amphrysian ample amplectant ampleness amplexation amplexicaudate amplexicaul amplexicauline amplexifoliate amplexus ampliate ampliation ampliative amplicative amplidyne amplification amplificative amplificator amplificatory amplifier amplify amplitude amply ampollosity ampongue ampoule ampul ampulla ampullaceous ampullar Ampullaria Ampullariidae ampullary ampullate ampullated ampulliform ampullitis ampullula amputate amputation amputational amputative amputator amputee ampyx amra amreeta amrita Amritsar amsath amsel Amsonia Amsterdamer amt amtman Amuchco amuck Amueixa amuguis amula amulet amuletic amulla amunam amurca amurcosity amurcous Amurru amusable amuse amused amusedly amusee amusement amuser amusette Amusgo amusia amusing amusingly amusingness amusive amusively amusiveness amutter amuyon amuyong amuze amvis Amy amy Amyclaean Amyclas amyelencephalia amyelencephalic amyelencephalous amyelia amyelic amyelinic amyelonic amyelous amygdal amygdala Amygdalaceae amygdalaceous amygdalase amygdalate amygdalectomy amygdalic amygdaliferous amygdaliform amygdalin amygdaline amygdalinic amygdalitis amygdaloid amygdaloidal amygdalolith amygdaloncus amygdalopathy amygdalothripsis amygdalotome amygdalotomy Amygdalus amygdonitrile amygdophenin amygdule amyl amylaceous amylamine amylan amylase amylate amylemia amylene amylenol amylic amylidene amyliferous amylin amylo amylocellulose amyloclastic amylocoagulase amylodextrin amylodyspepsia amylogen amylogenesis amylogenic amylohydrolysis amylohydrolytic amyloid amyloidal amyloidosis amyloleucite amylolysis amylolytic amylom amylometer amylon amylopectin amylophagia amylophosphate amylophosphoric amyloplast amyloplastic amyloplastid amylopsin amylose amylosis amylosynthesis amylum amyluria Amynodon amynodont amyosthenia amyosthenic amyotaxia amyotonia amyotrophia amyotrophic amyotrophy amyous Amyraldism Amyraldist Amyridaceae amyrin Amyris amyrol amyroot Amytal amyxorrhea amyxorrhoea an Ana ana Anabaena Anabantidae Anabaptism Anabaptist Anabaptistic Anabaptistical Anabaptistically Anabaptistry anabaptize Anabas anabasine anabasis anabasse anabata anabathmos anabatic anaberoga anabibazon anabiosis anabiotic Anablepidae Anableps anabo anabohitsite anabolic anabolin anabolism anabolite anabolize anabong anabranch anabrosis anabrotic anacahuita anacahuite anacalypsis anacampsis anacamptic anacamptically anacamptics anacamptometer anacanth anacanthine Anacanthini anacanthous anacara anacard Anacardiaceae anacardiaceous anacardic Anacardium anacatadidymus anacatharsis anacathartic anacephalaeosis anacephalize Anaces Anacharis anachorism anachromasis anachronic anachronical anachronically anachronism anachronismatical anachronist anachronistic anachronistical anachronistically anachronize anachronous anachronously anachueta anacid anacidity anaclasis anaclastic anaclastics Anaclete anacleticum anaclinal anaclisis anaclitic anacoenosis anacoluthia anacoluthic anacoluthically anacoluthon anaconda Anacreon Anacreontic Anacreontically anacrisis Anacrogynae anacrogynae anacrogynous anacromyodian anacrotic anacrotism anacrusis anacrustic anacrustically anaculture anacusia anacusic anacusis Anacyclus anadem anadenia anadicrotic anadicrotism anadidymus anadiplosis anadipsia anadipsic anadrom anadromous Anadyomene anaematosis anaemia anaemic anaeretic anaerobation anaerobe anaerobia anaerobian anaerobic anaerobically anaerobies anaerobion anaerobiont anaerobiosis anaerobiotic anaerobiotically anaerobious anaerobism anaerobium anaerophyte anaeroplastic anaeroplasty anaesthesia anaesthesiant anaesthetically anaesthetizer anaetiological anagalactic Anagallis anagap anagenesis anagenetic anagep anagignoskomena anaglyph anaglyphic anaglyphical anaglyphics anaglyphoscope anaglyphy anaglyptic anaglyptical anaglyptics anaglyptograph anaglyptographic anaglyptography anaglypton anagnorisis anagnost anagoge anagogic anagogical anagogically anagogics anagogy anagram anagrammatic anagrammatical anagrammatically anagrammatism anagrammatist anagrammatize anagrams anagraph anagua anagyrin anagyrine Anagyris anahau Anahita Anaitis Anakes anakinesis anakinetic anakinetomer anakinetomeric anakoluthia anakrousis anaktoron anal analabos analav analcime analcimite analcite analcitite analecta analectic analects analemma analemmatic analepsis analepsy analeptic analeptical analgen analgesia analgesic Analgesidae analgesis analgesist analgetic analgia analgic analgize analkalinity anallagmatic anallantoic Anallantoidea anallantoidean anallergic anally analogic analogical analogically analogicalness analogion analogism analogist analogistic analogize analogon analogous analogously analogousness analogue analogy analphabet analphabete analphabetic analphabetical analphabetism analysability analysable analysand analysation analyse analyser analyses analysis analyst analytic analytical analytically analytics analyzability analyzable analyzation analyze analyzer Anam anam anama anamesite anametadromous Anamirta anamirtin Anamite anamite anammonid anammonide anamnesis anamnestic anamnestically Anamnia Anamniata Anamnionata anamnionic Anamniota anamniote anamniotic anamorphic anamorphism anamorphoscope anamorphose anamorphosis anamorphote anamorphous anan anana ananaplas ananaples ananas ananda anandrarious anandria anandrous ananepionic anangioid anangular Ananias Ananism Ananite anankastic Anansi Ananta anantherate anantherous ananthous ananym anapaest anapaestic anapaestical anapaestically anapaganize anapaite anapanapa anapeiratic anaphalantiasis Anaphalis anaphase Anaphe anaphia anaphora anaphoral anaphoria anaphoric anaphorical anaphrodisia anaphrodisiac anaphroditic anaphroditous anaphylactic anaphylactin anaphylactogen anaphylactogenic anaphylactoid anaphylatoxin anaphylaxis anaphyte anaplasia anaplasis anaplasm Anaplasma anaplasmosis anaplastic anaplasty anaplerosis anaplerotic anapnea anapneic anapnoeic anapnograph anapnoic anapnometer anapodeictic anapophysial anapophysis anapsid Anapsida anapsidan Anapterygota anapterygote anapterygotism anapterygotous Anaptomorphidae Anaptomorphus anaptotic anaptychus anaptyctic anaptyctical anaptyxis anaqua anarcestean Anarcestes anarch anarchal anarchial anarchic anarchical anarchically anarchism anarchist anarchistic anarchize anarchoindividualist anarchosocialist anarchosyndicalism anarchosyndicalist anarchy anarcotin anareta anaretic anaretical anargyros anarthria anarthric anarthropod Anarthropoda anarthropodous anarthrosis anarthrous anarthrously anarthrousness anartismos anarya Anaryan Anas Anasa anasarca anasarcous Anasazi anaschistic anaseismic Anasitch anaspadias anaspalin Anaspida Anaspidacea Anaspides anastalsis anastaltic Anastasia Anastasian anastasimon anastasimos anastasis Anastasius anastate anastatic Anastatica Anastatus anastigmat anastigmatic anastomose anastomosis anastomotic Anastomus anastrophe Anastrophia Anat anatase anatexis anathema anathematic anathematical anathematically anathematism anathematization anathematize anathematizer anatheme anathemize Anatherum Anatidae anatifa Anatifae anatifer anatiferous Anatinacea Anatinae anatine anatocism Anatolian Anatolic anatomic anatomical anatomically anatomicobiological anatomicochirurgical anatomicomedical anatomicopathologic anatomicopathological anatomicophysiologic anatomicophysiological anatomicosurgical anatomism anatomist anatomization anatomize anatomizer anatomopathologic anatomopathological anatomy anatopism anatox anatoxin anatreptic anatripsis anatripsology anatriptic anatron anatropal anatropia anatropous Anatum anaudia anaunter anaunters Anax Anaxagorean Anaxagorize anaxial Anaximandrian anaxon anaxone Anaxonia anay anazoturia anba anbury Ancerata ancestor ancestorial ancestorially ancestral ancestrally ancestress ancestrial ancestrian ancestry Ancha Anchat Anchietea anchietin anchietine anchieutectic anchimonomineral Anchisaurus Anchises Anchistea Anchistopoda anchithere anchitherioid anchor anchorable anchorage anchorate anchored anchorer anchoress anchoret anchoretic anchoretical anchoretish anchoretism anchorhold anchorite anchoritess anchoritic anchoritical anchoritish anchoritism anchorless anchorlike anchorwise anchovy Anchtherium Anchusa anchusin anchusine anchylose anchylosis ancience anciency ancient ancientism anciently ancientness ancientry ancienty ancile ancilla ancillary ancipital ancipitous Ancistrocladaceae ancistrocladaceous Ancistrocladus ancistroid ancon Ancona anconad anconagra anconal ancone anconeal anconeous anconeus anconitis anconoid ancony ancora ancoral Ancyloceras Ancylocladus Ancylodactyla ancylopod Ancylopoda Ancylostoma ancylostome ancylostomiasis Ancylostomum Ancylus Ancyrean Ancyrene and anda andabatarian Andalusian andalusite Andaman Andamanese andante andantino Andaqui Andaquian Andarko Andaste Ande Andean Andesic andesine andesinite andesite andesitic Andevo Andhra Andi Andian Andine Andira andirin andirine andiroba andiron Andoke andorite Andorobo Andorran andouillet andradite andranatomy andrarchy Andre Andreaea Andreaeaceae Andreaeales Andrena andrenid Andrenidae Andrew andrewsite Andria Andriana Andrias andric androcentric androcephalous androcephalum androclinium Androclus androconium androcracy androcratic androcyte androdioecious androdioecism androdynamous androecial androecium androgametangium androgametophore androgen androgenesis androgenetic androgenic androgenous androginous androgone androgonia androgonial androgonidium androgonium Andrographis andrographolide androgynal androgynary androgyne androgyneity androgynia androgynism androgynous androgynus androgyny android androidal androkinin androl androlepsia androlepsy Andromache andromania Andromaque Andromeda Andromede andromedotoxin andromonoecious andromonoecism andromorphous andron Andronicus andronitis andropetalar andropetalous androphagous androphobia androphonomania androphore androphorous androphorum androphyll Andropogon Androsace Androscoggin androseme androsin androsphinx androsporangium androspore androsterone androtauric androtomy Andy anear aneath anecdota anecdotage anecdotal anecdotalism anecdote anecdotic anecdotical anecdotically anecdotist anele anelectric anelectrode anelectrotonic anelectrotonus anelytrous anematosis Anemia anemia anemic anemobiagraph anemochord anemoclastic anemogram anemograph anemographic anemographically anemography anemological anemology anemometer anemometric anemometrical anemometrically anemometrograph anemometrographic anemometrographically anemometry anemonal anemone Anemonella anemonin anemonol anemony anemopathy anemophile anemophilous anemophily Anemopsis anemoscope anemosis anemotaxis anemotropic anemotropism anencephalia anencephalic anencephalotrophia anencephalous anencephalus anencephaly anend anenergia anenst anent anenterous anepia anepigraphic anepigraphous anepiploic anepithymia anerethisia aneretic anergia anergic anergy anerly aneroid aneroidograph anerotic anerythroplasia anerythroplastic anes anesis anesthesia anesthesiant anesthesimeter anesthesiologist anesthesiology anesthesis anesthetic anesthetically anesthetist anesthetization anesthetize anesthetizer anesthyl anethole Anethum anetiological aneuploid aneuploidy aneuria aneuric aneurilemmic aneurin aneurism aneurismally aneurysm aneurysmal aneurysmally aneurysmatic anew Anezeh anfractuose anfractuosity anfractuous anfractuousness anfracture Angami Angara angaralite angaria angary Angdistis angekok angel Angela angelate angeldom Angeleno angelet angeleyes angelfish angelhood angelic Angelica angelica Angelical angelical angelically angelicalness Angelican angelicic angelicize angelico angelin Angelina angeline angelique angelize angellike Angelo angelocracy angelographer angelolater angelolatry angelologic angelological angelology angelomachy Angelonia angelophany angelot angelship Angelus anger angerly Angerona Angeronalia Angers Angetenar Angevin angeyok angiasthenia angico Angie angiectasis angiectopia angiemphraxis angiitis angild angili angina anginal anginiform anginoid anginose anginous angioasthenia angioataxia angioblast angioblastic angiocarditis angiocarp angiocarpian angiocarpic angiocarpous angiocavernous angiocholecystitis angiocholitis angiochondroma angioclast angiocyst angiodermatitis angiodiascopy angioelephantiasis angiofibroma angiogenesis angiogenic angiogeny angioglioma angiograph angiography angiohyalinosis angiohydrotomy angiohypertonia angiohypotonia angioid angiokeratoma angiokinesis angiokinetic angioleucitis angiolipoma angiolith angiology angiolymphitis angiolymphoma angioma angiomalacia angiomatosis angiomatous angiomegaly angiometer angiomyocardiac angiomyoma angiomyosarcoma angioneoplasm angioneurosis angioneurotic angionoma angionosis angioparalysis angioparalytic angioparesis angiopathy angiophorous angioplany angioplasty angioplerosis angiopoietic angiopressure angiorrhagia angiorrhaphy angiorrhea angiorrhexis angiosarcoma angiosclerosis angiosclerotic angioscope angiosis angiospasm angiospastic angiosperm Angiospermae angiospermal angiospermatous angiospermic angiospermous angiosporous angiostegnosis angiostenosis angiosteosis angiostomize angiostomy angiostrophy angiosymphysis angiotasis angiotelectasia angiothlipsis angiotome angiotomy angiotonic angiotonin angiotribe angiotripsy angiotrophic Angka anglaise angle angleberry angled anglehook anglepod angler Angles anglesite anglesmith angletouch angletwitch anglewing anglewise angleworm Anglian Anglic Anglican Anglicanism Anglicanize Anglicanly Anglicanum Anglicism Anglicist Anglicization anglicization Anglicize anglicize Anglification Anglify anglimaniac angling Anglish Anglist Anglistics Anglogaea Anglogaean angloid Angloman Anglomane Anglomania Anglomaniac Anglophile Anglophobe Anglophobia Anglophobiac Anglophobic Anglophobist ango Angola angolar Angolese angor Angora angostura Angouleme Angoumian Angraecum angrily angriness angrite angry angst angster Angstrom angstrom anguid Anguidae anguiform Anguilla Anguillaria Anguillidae anguilliform anguilloid Anguillula Anguillulidae Anguimorpha anguine anguineal anguineous Anguinidae anguiped Anguis anguis anguish anguished anguishful anguishous anguishously angula angular angulare angularity angularization angularize angularly angularness angulate angulated angulately angulateness angulation angulatogibbous angulatosinuous anguliferous angulinerved Anguloa angulodentate angulometer angulosity angulosplenial angulous anguria Angus angusticlave angustifoliate angustifolious angustirostrate angustisellate angustiseptal angustiseptate angwantibo anhalamine anhaline anhalonine Anhalonium anhalouidine anhang Anhanga anharmonic anhedonia anhedral anhedron anhelation anhelous anhematosis anhemolytic anhidrosis anhidrotic anhima Anhimae Anhimidae anhinga anhistic anhistous anhungered anhungry anhydrate anhydration anhydremia anhydremic anhydric anhydride anhydridization anhydridize anhydrite anhydrization anhydrize anhydroglocose anhydromyelia anhydrous anhydroxime anhysteretic ani Aniba Anice aniconic aniconism anicular anicut anidian anidiomatic anidiomatical anidrosis Aniellidae aniente anigh anight anights anil anilao anilau anile anileness anilic anilid anilide anilidic anilidoxime aniline anilinism anilinophile anilinophilous anility anilla anilopyrin anilopyrine anima animability animable animableness animadversion animadversional animadversive animadversiveness animadvert animadverter animal animalcula animalculae animalcular animalcule animalculine animalculism animalculist animalculous animalculum animalhood Animalia animalian animalic animalier animalish animalism animalist animalistic animality Animalivora animalivore animalivorous animalization animalize animally animastic animastical animate animated animatedly animately animateness animater animating animatingly animation animatism animatistic animative animatograph animator anime animi Animikean animikite animism animist animistic animize animosity animotheism animous animus anion anionic aniridia anis anisal anisalcohol anisaldehyde anisaldoxime anisamide anisandrous anisanilide anisate anischuria anise aniseed aniseikonia aniseikonic aniselike aniseroot anisette anisic anisidin anisidine anisil anisilic anisobranchiate anisocarpic anisocarpous anisocercal anisochromatic anisochromia anisocoria anisocotyledonous anisocotyly anisocratic anisocycle anisocytosis anisodactyl Anisodactyla Anisodactyli anisodactylic anisodactylous anisodont anisogamete anisogamous anisogamy anisogenous anisogeny anisognathism anisognathous anisogynous anisoin anisole anisoleucocytosis Anisomeles anisomelia anisomelus anisomeric anisomerous anisometric anisometrope anisometropia anisometropic anisomyarian Anisomyodi anisomyodian anisomyodous anisopetalous anisophyllous anisophylly anisopia anisopleural anisopleurous anisopod Anisopoda anisopodal anisopodous anisopogonous Anisoptera anisopterous anisosepalous anisospore anisostaminous anisostemonous anisosthenic anisostichous Anisostichus anisostomous anisotonic anisotropal anisotrope anisotropic anisotropical anisotropically anisotropism anisotropous anisotropy anisoyl anisum anisuria anisyl anisylidene Anita anither anitrogenous anjan Anjou ankaramite ankaratrite ankee anker ankerite ankh ankle anklebone anklejack anklet anklong Ankoli Ankou ankus ankusha ankylenteron ankyloblepharon ankylocheilia ankylodactylia ankylodontia ankyloglossia ankylomele ankylomerism ankylophobia ankylopodia ankylopoietic ankyloproctia ankylorrhinia Ankylosaurus ankylose ankylosis ankylostoma ankylotia ankylotic ankylotome ankylotomy ankylurethria ankyroid anlace anlaut Ann ann Anna anna Annabel annabergite annal annale annaline annalism annalist annalistic annalize annals Annam Annamese Annamite Annamitic Annapurna annat annates annatto anneal annealer annectent annection annelid Annelida annelidan Annelides annelidian annelidous annelism Annellata anneloid annerodite Anneslia annet Annette annex annexa annexable annexal annexation annexational annexationist annexer annexion annexionist annexitis annexive annexment annexure annidalin Annie Anniellidae annihilability annihilable annihilate annihilation annihilationism annihilationist annihilative annihilator annihilatory Annist annite anniversarily anniversariness anniversary anniverse annodated Annona annona Annonaceae annonaceous annotate annotater annotation annotative annotator annotatory annotine annotinous announce announceable announcement announcer annoy annoyance annoyancer annoyer annoyful annoying annoyingly annoyingness annoyment annual annualist annualize annually annuary annueler annuent annuitant annuity annul annular Annularia annularity annularly annulary Annulata annulate annulated annulation annulet annulettee annulism annullable annullate annullation annuller annulment annuloid Annuloida Annulosa annulosan annulose annulus annunciable annunciate annunciation annunciative annunciator annunciatory anoa Anobiidae anocarpous anociassociation anococcygeal anodal anode anodendron anodic anodically anodize Anodon Anodonta anodontia anodos anodyne anodynia anodynic anodynous anoegenetic anoesia anoesis anoestrous anoestrum anoestrus anoetic anogenic anogenital Anogra anoil anoine anoint anointer anointment anole anoli anolian Anolis Anolympiad anolyte Anomala anomaliflorous anomaliped anomalism anomalist anomalistic anomalistical anomalistically anomalocephalus anomaloflorous Anomalogonatae anomalogonatous Anomalon anomalonomy Anomalopteryx anomaloscope anomalotrophy anomalous anomalously anomalousness anomalure Anomaluridae Anomalurus anomaly Anomatheca Anomia Anomiacea Anomiidae anomite anomocarpous anomodont Anomodontia Anomoean Anomoeanism anomophyllous anomorhomboid anomorhomboidal anomphalous Anomura anomural anomuran anomurous anomy anon anonang anoncillo anonol anonychia anonym anonyma anonymity anonymous anonymously anonymousness anonymuncule anoopsia anoperineal anophele Anopheles Anophelinae anopheline anophoria anophthalmia anophthalmos Anophthalmus anophyte anopia anopisthographic Anopla Anoplanthus anoplocephalic anoplonemertean Anoplonemertini anoplothere Anoplotheriidae anoplotherioid Anoplotherium anoplotheroid Anoplura anopluriform anopsia anopubic anorak anorchia anorchism anorchous anorchus anorectal anorectic anorectous anorexia anorexy anorgana anorganic anorganism anorganology anormal anormality anorogenic anorth anorthic anorthite anorthitic anorthitite anorthoclase anorthographic anorthographical anorthographically anorthography anorthophyre anorthopia anorthoscope anorthose anorthosite anoscope anoscopy Anosia anosmatic anosmia anosmic anosphrasia anosphresia anospinal anostosis Anostraca anoterite another anotherkins anotia anotropia anotta anotto anotus anounou Anous anovesical anoxemia anoxemic anoxia anoxic anoxidative anoxybiosis anoxybiotic anoxyscope ansa ansar ansarian Ansarie ansate ansation Anseis Ansel Anselm Anselmian Anser anserated Anseres Anseriformes Anserinae anserine anserous anspessade ansu ansulate answer answerability answerable answerableness answerably answerer answeringly answerless answerlessly ant Anta anta antacid antacrid antadiform Antaean Antaeus antagonism antagonist antagonistic antagonistical antagonistically antagonization antagonize antagonizer antagony Antaimerina Antaios Antaiva antal antalgesic antalgol antalkali antalkaline antambulacral antanacathartic antanaclasis Antanandro antanemic antapex antaphrodisiac antaphroditic antapocha antapodosis antapology antapoplectic Antar Antara antarchism antarchist antarchistic antarchistical antarchy Antarctalia Antarctalian antarctic Antarctica antarctica antarctical antarctically Antarctogaea Antarctogaean Antares antarthritic antasphyctic antasthenic antasthmatic antatrophic antdom ante anteact anteal anteambulate anteambulation anteater antebaptismal antebath antebrachial antebrachium antebridal antecabinet antecaecal antecardium antecavern antecedaneous antecedaneously antecede antecedence antecedency antecedent antecedental antecedently antecessor antechamber antechapel Antechinomys antechoir antechurch anteclassical antecloset antecolic Nevow-0.14.2/examples/formbuilder/0000755000175000017500000000000012761123542021007 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/formbuilder/__init__.py0000644000175000017500000000000012611541671023107 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/formbuilder/formbuilder.py0000644000175000017500000000510612611541671023676 0ustar mithrandimithrandi00000000000000## formbuilder from zope.interface import implements from nevow import rend from nevow import loaders from nevow import tags as T from nevow import util from formless import annotate from formless import webform from formless import configurable from twisted.python import reflect class BuilderCore(configurable.Configurable): def __init__(self): configurable.Configurable.__init__(self, None) self.formElements = [] def getBindingNames(self, ctx): return ['form'] def bind_form(self, ctx): return annotate.MethodBinding( 'action', annotate.Method(arguments=self.formElements)) def action(self, **kw): print "ACTION!", kw def addElement(self, name, type): self.formElements.append( annotate.Argument(name, type())) allTypes = [annotate.String, annotate.Text, annotate.Integer, annotate.Real, annotate.Password] typeChoice = annotate.Choice(choices=allTypes, valueToKey=reflect.qual, keyToValue=reflect.namedAny, stringify=lambda x: x.__name__) class IFormBuilder(annotate.TypedInterface): def addElement(name=annotate.String(required=True), type=typeChoice): """Add Element Add an element to this form. """ pass addElement = annotate.autocallable(addElement) def clearForm(): """Clear Form Clear this form. """ clearForm = annotate.autocallable(clearForm) class FormBuilder(rend.Page): implements(IFormBuilder) addSlash = True def __init__(self): rend.Page.__init__(self) self.clearForm() def configurable_formBuilder(self, ctx): return configurable.TypedInterfaceConfigurable(self) def configurable_dynamicForm(self, ctx): return self.builderCore def addElement(self, name, type): self.builderCore.addElement(name, type) def clearForm(self): self.builderCore = BuilderCore() docFactory = loaders.stan(T.html[ T.head[ T.title["Form builder!"]], T.style(type="text/css")[ open(util.resource_filename('formless', 'freeform-default.css')).read()], T.body[ T.h1["Welcome to form builder"], webform.renderForms('formBuilder'), T.h2["Here is your form:"], webform.renderForms('dynamicForm')]]) ## Startup glue from nevow import appserver from twisted.application import service from twisted.application import internet application = service.Application('formbuilder') internet.TCPServer(8080, appserver.NevowSite(FormBuilder())).setServiceParent(application) Nevow-0.14.2/examples/formpost/0000755000175000017500000000000012761123542020346 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/formpost/__init__.py0000644000175000017500000000000012611541671022446 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/formpost/formpost.py0000644000175000017500000000175512611541671022602 0ustar mithrandimithrandi00000000000000# -*- python -*- from zope.interface import implements from nevow import loaders from nevow import rend from nevow import tags from nevow import url from formless import annotate from formless import webform class IMyForm(annotate.TypedInterface): foo = annotate.Integer() class FormPage(rend.Page): implements(IMyForm) addSlash = True child_webform_css = webform.defaultCSS # We need this to implement IMyForm foo = 5 docFactory = loaders.stan( tags.html[ tags.head[ tags.link(rel='stylesheet', type='text/css', href=url.here.child('webform_css')), ], tags.body[ "Hello! Here is a form:", # We want to render the "default" configurable. # This is located in Page.configurable_() and is going to be # 'self' (which, as you see above, implements IMyForm). webform.renderForms(), ], ], ) Nevow-0.14.2/examples/formpost/formpost2.py0000644000175000017500000000557712611541671022672 0ustar mithrandimithrandi00000000000000# -*- python -*- from zope.interface import implements from nevow import loaders from nevow import rend from nevow import tags from nevow import inevow from nevow import url from formless import annotate from formless import webform from twisted.internet import defer #oldChoicesWay = annotate.Choice(choicesAttribute='theChoices') # Doing this gives you a DeprecationWarning now # If you still want to use an attribute or method of some other object, you should use a function as shown below, # but look up IResource(ctx) or IConfigurable(ctx), whichever is more appropriate. newChoicesWay = annotate.Choice(lambda c, d: range(30)) deferChoicesWay = annotate.Choice(lambda c, d: defer.succeed(['abcd', 'efgh', 'ijkl'])) radioChoices = annotate.Radio(["Old", "Tyme", "Radio"]) ## An example of using custom valueToKey and keyToValue functions to serialize/deserialize items values = {0: dict(name="Zero", stuff=1234), 1: dict(name="One", stuff=1234), 2: dict(name="Two", stuff=2345435)} customValueToKey = annotate.Choice( [0, 1, 2], # Perhaps these are primary keys in a database stringify=lambda x: values[x]['name'], # Do a database lookup to render a nice label in the ui valueToKey=str, # Convert the primary key to a value suitable for sending across the web keyToValue=lambda x: values[int(x)]) # Do a database lookup to get the actual value to pass to the binding class IMyForm(annotate.TypedInterface): foo = annotate.Integer() def bar(baz=annotate.Integer(), slam=newChoicesWay, ham=deferChoicesWay, radio=radioChoices, custom=customValueToKey): pass bar = annotate.autocallable(bar) class Implementation(object): implements(IMyForm) foo = 5 def bar(self, baz, slam, ham, radio, custom): return "You called bar! %s %s %s %s %r" % (baz, slam, ham, radio, custom) theChoices = [1, 2, 3] class FormPage(rend.Page): addSlash = True child_webform_css = webform.defaultCSS def render_hand(self, ctx, data): hand = inevow.IHand(ctx, None) if hand is not None: return ctx.tag[hand] return '' docFactory = loaders.stan( tags.html[ tags.head[ tags.link(rel='stylesheet', type='text/css', href=url.here.child('webform_css')), ], tags.body[ tags.h3(render=render_hand, style="color: red; font-size: xx-large"), "Hello! Here is a form:", # We want to render forms defined by the Implementation instance. # When we pass the Implementation instance to FormPage below, # rend.Page sets it as the .original attribute. To tell webform to render # forms described by this object, we use the configurable name "original". webform.renderForms('original'), ], ], ) Nevow-0.14.2/examples/fragments/0000755000175000017500000000000012761123542020463 5ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/fragments/__init__.py0000644000175000017500000000000012611541671022563 0ustar mithrandimithrandi00000000000000Nevow-0.14.2/examples/fragments/fragments.py0000644000175000017500000000302112611541671023020 0ustar mithrandimithrandi00000000000000from twisted.python import util from nevow import inevow, rend, tags as t, loaders class Root(rend.Page): addSlash = True docFactory = loaders.xmlfile(util.sibpath(__file__, 'main.html')) def data_ip(self, ctx, data): return inevow.IRequest(ctx).client.host def render_header(self, ctx, data): return ctx.tag[Header(data)] def render_sidebar(self, ctx, data): # This is only a different way of using a Fragment # you can either fill a slot or return it from a # render_* method ctx.tag.fillSlots('main_sidebar', SideBar()) return ctx.tag def render_content(self, ctx, data): return ctx.tag[Content()] class Header(rend.Fragment): docFactory = loaders.stan( t.invisible[ t.p(render=t.directive("ip"))["Welcome IP: "] ] ) def render_ip(self, ctx, data): return ctx.tag[data] class SideBar(rend.Fragment): docFactory = loaders.stan( t.ul[ t.li["Menuitem 1"], t.li["Menuitem 2"], t.li["Menuitem 3"], ] ) class Content(rend.Fragment): docFactory = loaders.stan( t.p["""Hi, this page is composed thanks to Fragments. A Fragment allows the programmer to dispatch the composition of the page to many different objects that represent a logical entity inside the page. The Fragment can be used just like any other piece of stan plus it understands render_* and data_* methods. For additional questions come in #twisted.web"""] ) Nevow-0.14.2/examples/fragments/main.html0000644000175000017500000000166612611541671022307 0ustar mithrandimithrandi00000000000000 Fragments Example