I am coding with python a web page in apache. When I execute in Idle a function of this kind:
def hello():
import time
print "hello"
time.sleep(1)
It prints hello, and then I see how it waits one second to print again the >>>
. But in the webserver, it seems like it waits for the full response in order for it to show it altogether, instead of returning each executed command. The problem is that I wanna print a static page while python does other backend stuff. Does anyone know how can I solve this?
EDIT
I want to do a python video record that I have developed. The web is the GUI between the python hardcore and the user. The user calls the server to record a video, so python function starts to work, but the user has to be a way of getting a response, pausing the record, and not just waiting there in front of a white screen.