Good day.
Thank you for all your responses.
It's seems that i have to AJAX the messages into the browser somehow,
but i have absolutely no idea how.
I am showing you the main template of any automation, maybe you can
understand what i am dealing with here.

# Controller file
def index():
    "Check if automation can run"
    content = ""
    result = True

    import MyCheckFunctions as ck
    if ck.CheckFoo1():
        content += "Input returned OKAY.<br>\n"
    else:
        content += "First check failed!<br>\n"
        result = False
    #
    if ck.CheckFoo2():
        content += "Output returned OKAY.<br>\n"
    else:
        content += "Second check failed!<br>\n"
        result = False
    #
    if result:
        content += "<a href='automation'>Start automation!</a>"
        Whatever-you-have-to-do-to-store-a-OKAY-cookie()

    return dict( content=XML(content) )

# Same file controller
def automation():
    "Run automation only if OKAY cookie is detected"
    content = ""

    Whatever-you-have-to-do-check-the-OKAY-cookie()
    #
    import MyFunctions as fc
    content += fc.DecompressInput()
    content += fc.MoveFiles()         # Takes quite some time to
finish.
    content += fc.ProcessFiles()     # Takes a lot of time to finish.
    content += fc.CompressOutput()
    content += fc.SendOutput()
    #
    Whatever-you-have-to-do-delete-the-OKAY-cookie()

    return dict( content=XML(content) )


So this is the basic of any automation. All functions are dumb, just
for the example.
I usually do stuff with batch files that i call when i need to perform
certain operations.

So, can anyone suggest how to deal with AJAX thingy? Or 'yield'
thingy? (ive never used yield)
Thank you. :)
--~--~---------~--~----~------------~-------~--~----~
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 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to