Executing a Python Script when Web Page is loaded
I had to do this too. I had a python script(which gets me data from another website) which gets executed when you click on a button.
I used Ruby on Rails for my client side code. I embedded the script file in my ruby controller which then gets called by my form and hence it gets executed.
eg: 
cmd = " python getData.py "
exec( cmd )
I'm trying to have it so that when my web page is loaded, a python script is executed. The website is run on an apache server and the script is in the same directory as the index.html (it's a very small project).
Is there anyway I can do this? I'm not trying to output the data from the python file to the webpage, nor am I trying to affect anything client-side, I simply want the python script to execute and do it's thing whenever the web page is loaded.
Is there some sort of javascript function that I can use? I've searched around but really haven't found anything similar. Thanks!