The following program opens a browser and navigates to www.cnn.com on Windows, but in OS X nothing happens. I'm not sure why.
import webbrowser
webbrowser.open_new("www.cnn.com")
Any thoughts?
You need to do:
import webbrowser
webbrowser.open_new("http://www.cnn.com")
On OS X, this is converted to the following shell command:
echo 'open location "http://www.cnn.com"' | osascript
For whatever reason, open location www.cnn.com does not work in osascript on OS X.
This was tested on OS X Lion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With