Hi Jonathan -

Could you write this up?  Some (me?!) might find it interesting / useful.

Thank you.

Yarko 

-----Original Message-----
From: Jonathan Benn <[EMAIL PROTECTED]>
Sent: Wednesday, November 26, 2008 6:55 AM
To: web2py Web Framework <web2py@googlegroups.com>
Subject: [web2py:12499] Re: your recommended way of calling controllers from 
the command line  ?


Hi Achipa,


On Nov 25, 1:55 pm, achipa <[EMAIL PROTECTED]> wrote:
> The subject says it all. I know a couple of methods (python -R
> wrapper, the older -S patch, piping, etc), but was wondering which you
> think is the cleanest (and cross platform) as I'd like to integrate it
> into my cron patch (so you could specify controllers/functions in your
> crontab file, not just executables).

I run into this problem a lot, because on GAE I can only make db calls
to a running server. So for example, if for an automated test suite I
need to modify the database, I can't do this directly from an outside
testing Python script.

My solution is to create test controller actions that modify the db,
and then expose them via XMLRPC. It works like a charm and makes the
functions very easy to execute from any arbitrary Python script.

--Jonathan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]

[The entire original message is not included]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to