#!/usr/bin/python
import cgi
-import cgitb
+#import cgitb
import sys
import re
sys.path.append('/home/naath/familyTreeProject/familyTree')
[conn,form]=everyPage.top()
-result = 1
-if result == None:
- everyPage.bad()
-else:
+age = form.getvalue('age')
+if age == None:
printMe = askQuestion.count_age_at_child('<br>')
if len(printMe)<3:
printMe = 'sorry, no data <br>'
everyPage.good(printMe)
+else:
+ result = re.match('[-]{0,1}[0-9]{1,4}$', str(age))
-everyPage.bottom(conn)
+ if result == None:
+ everyPage.bad()
+ else:
+ printMe = askQuestion.people_had_child_at_age(age,'<br>')
+ if len(printMe)<10:
+ printMe = 'sorry, no data <br>'
+ everyPage.good(printMe)
+
+
+everyPage.bottom()