import urllib
f = urllib.urlopen("http://www.google.com")
(not the best in syntax color selection)
Doesn’t work in Blender. The error says to check the console for now, but I don’t see anything in the Python console window or the log window. This is on OS X.
Also, I tried the same code in ideone, but no luck there either.
Something else I should be doing?
oh well, my suggested line opens the default browser on that url, what you wanna do is reading from a network address right? That’s of course not the same, but still, as python scripts block blender until finished, it’s not advised to do possibly long-asting I/O actions.
Anyway, if you wanna use urllib, make sure to check the python 3 docs, it changed a bit: