MadeR
April 3rd, 2007, 01:09 AM
Desiring to learn python for my degree thesis (web based application), I installed mod_python.
I wish python had a documentation like the one on php site. I'm getting mad try to figure out how to get something like $_GET and $_POST.
To learn the basics of mod_python and PSP pages I created two files:
---------------index.html---------------
<html>
<head>
<title>X</title>
</head>
<body>
<form id='x' name='x' method='get' action='prova.psp'>
<input type='text' name='t' id='t'/><br/>
<input type='text' name='u' id='u'/><br/>
<input type='submit' value='ok'/><br/>
</form>
</body>
</html>
---------------prova.psp---------------
<html>
<%= dir(form) %>
<%= form.list %>
</html>
whose output is:
['__contains__', '__doc__', '__getitem__', '__init__', '__len__', '__module__', 'get', 'getfirst', 'getlist', 'has_key', 'keys', 'list', 'make_field', 'make_file', 'read_to_boundary']
[Field('t', 'xyz'), Field('u', '123')]
Shouldn't form have 'values' and 'items' properties? http://www.modpython.org/live/mod_python-3.3.1/doc-html/pyapi-util-fstor.html
maybe I missed a step during installation?
I wish python had a documentation like the one on php site. I'm getting mad try to figure out how to get something like $_GET and $_POST.
To learn the basics of mod_python and PSP pages I created two files:
---------------index.html---------------
<html>
<head>
<title>X</title>
</head>
<body>
<form id='x' name='x' method='get' action='prova.psp'>
<input type='text' name='t' id='t'/><br/>
<input type='text' name='u' id='u'/><br/>
<input type='submit' value='ok'/><br/>
</form>
</body>
</html>
---------------prova.psp---------------
<html>
<%= dir(form) %>
<%= form.list %>
</html>
whose output is:
['__contains__', '__doc__', '__getitem__', '__init__', '__len__', '__module__', 'get', 'getfirst', 'getlist', 'has_key', 'keys', 'list', 'make_field', 'make_file', 'read_to_boundary']
[Field('t', 'xyz'), Field('u', '123')]
Shouldn't form have 'values' and 'items' properties? http://www.modpython.org/live/mod_python-3.3.1/doc-html/pyapi-util-fstor.html
maybe I missed a step during installation?