Module pyweb
[show private | hide private]
[frames | no frames]

Module pyweb

pyWeb - your Python DHTML framework

Official website: http://www.freenet.org.nz/python/pyweb

Written by David McNab (david at freenet dot org dot nz) Copyright (C) 2003, David McNab

Released under the GNU General Public License, a copy of which is included in the pyWeb distribution, and can also be viewed online at http://www.gnu.org/licenses/gpl.html.

No warranty, express or implied, applies in any way to this code. Use it strictly at your own risk.
Classes
a Creates an HTML '<A>' tag
abbr Creates an HTML '<ABBR>' tag
acronym Creates an HTML '<ACRONYM>' tag
address Creates an HTML '<ADDRESS>' tag
applet Creates an HTML '<APPLET>' tag
area Creates an HTML '<AREA>' tag
attr Convenience class which allows a list of tag attributes to be put first during tag construction, instead of at the end as is normally required by python syntax.
b Creates an HTML '<B>' tag
base Creates an HTML '<BASE>' tag
basefont Creates an HTML '<BASEFONT>' tag
bdo Creates an HTML '<BDO>' tag
big Creates an HTML '<BIG>' tag
blockquote Creates an HTML '<BLOCKQUOTE>' tag
body Creates the BODY section for the HTML document.
br Creates an HTML '<BR>' tag
button Creates an HTML '<BUTTON>' tag
caption Creates an HTML '<CAPTION>' tag
center Creates an HTML '<CENTER>' tag
cite Creates an HTML '<CITE>' tag
code Creates an HTML '<CODE>' tag
col Creates an HTML '<COL>' tag
colgroup Creates an HTML '<COLGROUP>' tag
css  
cssdef  
del_ Creates an HTML '<DEL>' tag
dfn Creates an HTML '<DFN>' tag
div Creates an HTML '<DIV>' tag
em Creates an HTML '<EM>' tag
fieldset Creates an HTML '<FIELDSET>' tag
font Creates an HTML '<FONT>' tag
form Creates an HTML '<FORM>' tag
frameset Creates an HTML '<FRAMESET>' tag
h1 Creates an HTML '<H1>' tag
h2 Creates an HTML '<H2>' tag
h3 Creates an HTML '<H3>' tag
h4 Creates an HTML '<H4>' tag
h5 Creates an HTML '<H5>' tag
h6 Creates an HTML '<H6>' tag
head Creates an HTML '<HEAD>' tag
hr Creates an HTML '<HR>' tag
html This is the top-level html page widget.
htmlRipper This is a handy class which supports the use of html files as templates, and is intended to be used in conjunction with the 'template=' constructor keyword for webwidget objects.
http Implements a session-ready http tag class, derived from class html
httpEmpty Implements a session-ready http tag class, derived from notag, so by default it has no html shit
httpenv Instances of this class hold all pertinent information relating to the current http request.
httpMixin Subclass of html tag class, which includes HTTP reply headers plus cookies in its dump(), as well as parsing cookies upon construction
httpNew Subclass of html tag class, which includes HTTP reply headers plus cookies in its dump(), as well as parsing cookies upon construction
i Creates an HTML '<I>' tag
iframe Creates an HTML '<IFRAME>' tag
img Creates an HTML '<IMG>' tag
input Creates an HTML '<INPUT>' tag
ins Creates an HTML '<INS>' tag
isindex Creates an HTML '<ISINDEX>' tag
kbd Creates an HTML '<KBD>' tag
label Creates an HTML '<LABEL>' tag
legend Creates an HTML '<LEGEND>' tag
li Creates an HTML '<LI>' tag
link Creates an HTML '<LINK>' tag
map Creates an HTML '<MAP>' tag
meta Creates an HTML '<META>' tag
myCookie  
notag 'Tag-less' container for storing content.
object_ Creates an HTML '<OBJECT>' tag
ol Creates an HTML '<OL>' tag
optgroup Creates an HTML '<OPTGROUP>' tag
option Creates an HTML '<OPTION>' tag
p Creates an HTML '<P>' tag
param Creates an HTML '<PARAM>' tag
pre Creates an HTML '<PRE>' tag
q Creates an HTML '<Q>' tag
s Creates an HTML '<S>' tag
saferUnpickler  
samp Creates an HTML '<SAMP>' tag
save Convenience class for saving a widget, under a named attrib of another widget
script Creates an HTML '<SCRIPT>' tag
select Creates an HTML '<SELECT>' tag
small Creates an HTML '<SMALL>' tag
span Creates an HTML '<SPAN>' tag
strike Creates an HTML '<STRIKE>' tag
strong Creates an HTML '<STRONG>' tag
style Creates an HTML '<STYLE>' tag
sub Creates an HTML '<SUB>' tag
sup Creates an HTML '<SUP>' tag
table Creates an HTML '<TABLE>' tag
tagid Marker class for setting a tag object's 'id' (which allows later location of the object through subscripting the parent object).
tbody Creates an HTML '<TBODY>' tag
td Creates an HTML '<TD>' tag
textarea Creates an HTML '<TEXTAREA>' tag
tfoot Creates an HTML '<TFOOT>' tag
th Creates an HTML '<TH>' tag
thead Creates an HTML '<THEAD>' tag
title Creates an HTML '<TITLE>' tag
tr Creates an HTML '<TR>' tag
tt Creates an HTML '<TT>' tag
u Creates an HTML '<U>' tag
ul Creates an HTML '<UL>' tag
var Creates an HTML '<VAR>' tag
webwidget This is the base class for all web widgets

Function Summary
  logmsg(s)
  parse_css(thing)
Parses a CSS declaration
  print_exception(filename)
  safePickleDict(mydict)
safe to serialise with standard pickler - gotta watch out when unpickling.
  safeUnpickleDict(s)
A safer unpickler, that uses our saferUnpickler class and therefore won't handle any class objects
  selectFromList(name, lst, dflt)
Creates a select tag object.
  tag(name, **kw)
  urlGetString(url, **kw)
Builds a url with http GET args, eg:

Variable Summary
int createDebugText = 0                                                                     
int pickleCompressLevel = 7                                                                     
str pickleSignatureKey = 'try to guess this, asshole!'
str pyweb_version = '0.1.0'

Function Details

parse_css(thing)

Parses a CSS declaration

safePickleDict(mydict)

safe to serialise with standard pickler - gotta watch out when unpickling.

Note - after serialising, the data gets base64 encoded to make it safe for storage as a cookie

safeUnpickleDict(s)

A safer unpickler, that uses our saferUnpickler class and therefore won't handle any class objects

selectFromList(name, lst, dflt='')

Creates a select tag object.

Arguments:
  • lst - the list of strings to build the select field from
  • dflt - the option to set as the default (optional)

urlGetString(url='', **kw)

Builds a url with http GET args, eg:
  • http://mysites.com/myscript.cgi?arg1=val1&arg2=val2...
Arguments:
  • url - optional - may be absolute or relative
Keywords:
  • http arguments.
Example:
urlGetString("myscript.cgi",
             name='myname',
             myage=43)

produces the url: 'myscript.cgi?name=myname&myage=43'

Variable Details

createDebugText

Type:
int
Value:
0                                                                     

pickleCompressLevel

Type:
int
Value:
7                                                                     

pickleSignatureKey

Type:
str
Value:
'try to guess this, asshole!'                                          

pyweb_version

Type:
str
Value:
'0.1.0'                                                                

Generated by Epydoc 2.0 on Sat Feb 7 20:08:05 2004 http://epydoc.sf.net