~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to doc/howto/listings/TwistedQuotes/webquote.rpy

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2004-06-21 22:01:11 UTC
  • mto: (2.2.3 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040621220111-vkf909euqnyrp3nr
Tags: upstream-1.3.0
ImportĀ upstreamĀ versionĀ 1.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- Python -*- 
 
2
 
 
3
from TwistedQuotes import webquoteresource
 
4
    
 
5
#__file__ is defined to be the name of this file; this is to
 
6
#get the sibling file "quotes.txt" which should be in the same directory
 
7
import os
 
8
quotefile = os.path.join(os.path.split(__file__)[0], "quotes.txt")
 
9
 
 
10
#ResourceScript requires us to define 'resource'.
 
11
#This resource is used to render the page.
 
12
resource = webquoteresource.QuoteResource([quotefile])