kNish wrote:
> Hi,
>
> scheduler.py has a function weekdaytask. It needs five parameters as 
> stated in the scheduler.py. weekdays and timeonday I figured out.  
> what is name and action, args=None, kw=None ?

This is a TurboGears question, right?  As such, this is not really the 
right place to ask about it.  However, it's pretty easy to figure out 
what these are for, given the source code.

All four of those parameters are passed without change to the Task 
constructor, which simply stores them for future use.  You can see them 
being used in WeekdayTask.execute.  The "name" is not terribly 
important.  "action" is the function to be called when the task is 
executed.  "args" and "kw" are passed to the "action" function at that time.

"args" should be the list of positional parameters you need to pass to 
the "action" function (if any).  "kw" should be a dictionary of the 
keyword parameters you need to pass.  So, if you wanted to create a task 
to execute the following function:

    birthday( hwnd, name="kNish", year=2008 )

you would do something like this:
:
    wt = scheduler.WeekdayTask( "A birthday", xxx, xxx, birthday, 
(hwnd,), {"name": "kNish", "year": 2008 } )

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to