Zope NewBie loosing hairs on python

K

Krapul

Hi everybody,

I'm using python for long time, now; currently developing a web-based
game working with python CGI and IIS. I've heard about various
interesting zope functionalities, but I'm facing a problem while
simply trying to integrate my python code within zope.

Let's depict a bit of example, I could schematise my current apps like
this:

***on one side, I have a python module...let's say testa.py, formated
like this:

class testb:
def __init__(self):
self.x='hello'
def dsp(self):
return self.x

***on the second side I have a CGI:

import cgi,cgitb
import sys
import testa
sys.stderr = sys.stdout
print "HTTP/1.0 200 OK" + chr(13)+chr(10)

a=testa.testb()
x=a.dsp()
print "<html><head></head><body>"+str(x)+"</body></html>
cgitb.enable()
************************************************************************

What I would understand is : "Is there a way to upload my python
module to zope and then using it in a dtml page (I guess)instead of
CGI?"

Please somebody help...I'm completly lost...Thanks in advance,

Ludo
 
D

Diez B. Roggisch

Krapul said:
What I would understand is : "Is there a way to upload my python
module to zope and then using it in a dtml page (I guess)instead of
CGI?"

You can add python scripts using the management interface and call them from
dtml (which you correctly identified as replacement for a cgi).

And you can create so-called external methods that also containt "pure"
python and aren't restricted in some module usages.

Look on zope.org, you'll find all you need there.
 
B

bobb

I believe your looking to use an external method.
there is a zope group also, (e-mail address removed)...

bobb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top