Apache2Triad Help, Support and Development Forum Index Apache2Triad Help, Support and Development
The apache2triad help , support and development forums
 

Python
Click here to go to the original topic

 
       Apache2Triad Help, Support and Development Forum Index -> Programming
View previous topic :: View next topic  
Author Message
Compman



Joined: 27 May 2006
Posts: 1

Posted: Sat May 27, 2006 11:50 am    Post subject: Python  

Hi,
I am all very new to this. I want to be able to run my Python scripts from localhost to check them before I use them.

My first script is this.

def index():
return """<HTML><BODY>
<FORM ACTION=Task>
Enter N: <INPUT TYPE=TEXT NAME=AEdit><BR>
<INPUT TYPE=SUBMIT VALUE=Calc>
</FORM></BODY></HTML>"""

def Task(AEdit):
n = int(AEdit)
res = 0
for i in range(1,n+1):
if i%2==0:
res=res+1
return """<HTML><BODY>
Number of even numbers in the range is %s
</BODY></HTML>""" % (res)

How do I get it to run. I think I need mod_python publisher installed.
How do I do that.

Thanks in advance for any help.
Back to top  
Vlad Alexa Mancini



Joined: 07 Jul 2003
Posts: 1538

Posted: Fri Jun 02, 2006 6:03 pm    Post subject:  

publisher is part of mod_python which is installed , enable it , use the coresponding test scripts in the cp for testing and example
Back to top  
 
       Apache2Triad Help, Support and Development Forum Index -> Programming
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.13 © 2001, 2002 phpBB Group