Yeah, it is possible. I originally developed it that way, kindof. There's a file named cl_psp.py in the psp directory that will compile a *.psp file to *.py.
The problem is that all of the plumbing is in webware. The *.py file that PSP spits out is a webware servlet class. It's won't do anything by itself. Now, it wouldn't be all that hard to make that *.py executable. But the code isn't set up to make that easily broken out from the servlet producing code. Basically, you would need to subclass ParseEventHandler, and change to methods down at the bottom of ParseEventHandler that actually write out the *.py file so that they would also write out a main statement. Then you would need to create a runtime environment for the servlet. It would need an input dictionary, an output buffer, etc etc. Then, you'd need to have the PSPCompiler class use your ParseEventHandler. OK, so it's a little tougher than I originally though when I started writing this. However, it can be done. But you might be getting your hands alot more dirty than you want. JAy Rolf Hanson wrote: > Hi, > Would it be difficult to modify python server pages so that they would > not need to use WebWare at all? I.e. it would be similar to .php, > without a separate app server. > > Right now I'm using webware, but I really only use .psp pages to call > some python stuff I use to hit a postgresql database. I never use, or > plan to use :COMKit, TaskKit , UserKit, MiddleKit, etc. > > I've looked at mod_python, but I'd rather have a system where I can > embed a python function between some tags, vs spitting out html from a > python script. > > Thanks, > > Rolf _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel
