Python webbrowser outputting page to console

python

#1

Hi,

How can I get the webbrowser.open module (https://docs.python.org/2/library/webbrowser.html) to open a new window? Currently, when I run the file, information is populated in the terminal. See picture for details.


#2

In case anyone runs into this issue, I just wanted to follow-up and share what I learned…

The python documentation states that webbrowser displays a url using the default browser. And, text-mode browsers will be used if graphical browsers are not available It’s likely that the default browser in Cloud9 is terminal based, not a graphical one.

Side-note: You can actually surf the web from the terminal if you wanted to.


#3

You would need to run this on your computer instead of cloud9 because cloud9 can’t run native graphical things. Instead, cloud9 just has it’s web browser set as some terminal browser so that you will be able to see the content of the site without need to support an actual web browser.