On Sep 11, 2009, at 1:09 PM, V. K wrote: > > Thanks for your response. > > That is a clean solution: > > 2 questions: > - How to generate the "document as a string" > I mean, by using the HTML generation (view + controller) engine in > web2py? > - How to execute a controller from python shell (not as web service)?
I'm probably not the person to answer that, partly because I'm a little confused about what you're trying to do. Suppose you invoke something from the shell that creates your document (let's say as a string). Then what? > > > > On Sep 11, 12:54 pm, Jonathan Lundell <[email protected]> wrote: >> On Sep 11, 2009, at 10:57 AM, V. K wrote: >> >> >> >>> I was looking to use the python shell to generate the final HTML >>> that >>> is rendered in a browser: >> >>> Let me explain: >> >>> Normally in web2py: >>> the URL "http://www.misite.com/app/default/index" maps to a python >>> function and uses an appropriate view file to return HTML/XML/ >>> JSON... >>> data. >> >>> I wanted to use the python shell to do all the processing to >>> generate >>> the final data. >> >>> For example: >> >>>>>> python_function(app.default.index) should return the processed >>>>>> HTML/XML/JSON exactly what the URL >> >>> I am sure that the web2py python web-server uses some python >>> functions >>> internally. Is it possible to use those explicitly? >> >> You just want the controller to generate the entire document that >> gets >> returned? If so, how about returning a dict whose only member >> contains >> that document as a string, with a trivial view that just outputs that >> string? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

