I'm writing a Flask (python 2.7) application in which a function uses the webbrowser lib to open several new tabs in the user's browser (similar to Kayak).
The app works correctly when I run it locally. But when I deploy to OpenShift, the app doesn't launch tabs or indicate any errors. Is there any reason why webbrowser would operate differently on my local machine vs. a PaaS? I've tried this in Chrome / Safari / Firefox on OSX & Chrome on Android. Appreciate your help!
Here's the function:
def launch(data):
try:
for x in data:
webbrowser.open(x['url'],new=2)
# i've also tried .open_new_tab(x['url'])
except TypeError:
return render_template('error.html')
and here's the output from tail:
[24/Jun/2014:23:19:24 -0400] "GET /-JQDELftipTPc12ohHy4 HTTP/1.1" 200 2563 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"
[24/Jun/2014:23:19:25 -0400] "GET /static/style.css HTTP/1.1" 304 - "http://tshare-nealrs.rhcloud.com/-JQDELftipTPc12ohHy4" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"
[24/Jun/2014:23:19:25 -0400] "GET /static/share.js HTTP/1.1" 304 - "http://tshare-nealrs.rhcloud.com/-JQDELftipTPc12ohHy4" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"