On Fri, Nov 21, 2014 at 4:37 PM, Clayton Kirkwood <[email protected]> wrote: > Hi all. > > > > Got a general problem with url work. I’ve struggled through a lot of code > which uses urllib.[parse,request]* and urllib2. First q: I read someplace in > urllib documentation which makes it sound like either urllib or urllib2 > modules are being deprecated in 3.5. Don’t know if it’s only part or whole.
The names of the modules changed I believe in v3.x. But you can save yourself a lot of trouble by using the excelent 3rd party package called requests: http://docs.python-requests.org/en/latest/ Also, please use plaintext for your questions. That way everyone can read them, and the indentation won't get mangled > > I’ve read through a lot that says that urllib..urlopen needs urlencode, > and/or encode(‘utf-8’) for byte conversion, but I’ve seen plenty of examples > where nothing is being encoded either way. I also have a sneeking suspicious > that urllib2 code does all of the encoding. I’ve read that if things aren’t > encoded that I will get TypeError, yet I’ve seen plenty of examples where > there is no error and no encoding. > > > > Why do so many examples seem to not encode? And not get TypeError? And yes, > for those of you who are about to suggest it, I have tried a lot of things > and read for many hours. > > > > Thanks, > > > > Clayton > > > > > > > > You can tell the caliber of a man by his gun--c. kirkwood > > > > > _______________________________________________ > Tutor maillist - [email protected] > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > -- Joel Goldstick http://joelgoldstick.com _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
