At least a few times a day I wish python had the following shortcut
syntax:
vbl.=func(args)
this would be equivalent to
vbl = vbl.func(args)
example:
foo = "Hello world"
foo.=split(" ")
print foo
# ['Hello', 'world']
and I guess you could generalize this to
vbl.=[some text]
#
vbl = vbl.[some
Thanks, guys.
I tried on a different computer, and it worked fine.I then found out
that my computer thyought i had a proxy server, and after i cleaned
that up, it worked.
Thanks again
--
http://mail.python.org/mailman/listinfo/python-list
I tried using urllib2 and this is what i got:
>>import urllib2
>>the_url = 'http://www.google.com'
>>req = urllib2.Request(the_url)
>>handle = urllib2.urlopen(req)
Traceback (most recent call last):
File "", line 1, in ?
File "C:\Python24\lib\urllib2.py", line 130, in urlopen
return _opener
Hello,
I'm trying to use the urllib module, but when i try urllib.urlopen, it
gives me a socket error:
>>import urllib
>>print urllib.urlopen('http://www.google.com/').read()
Traceback (most recent call last):
File "", line 1, in ?
File "C:\Python24\lib\urllib.py", line