Re: [Tutor] http question

2014-11-09 Thread Alan Gauld
On 09/11/14 05:53, Clayton Kirkwood wrote: After reading various documentation, it seems that the urllib is limited. Perhaps I am wrong and you will clarify that point. Every library is limited. The issue is not whether it is limited, but whether it has enough functionality to do what you nee

Re: [Tutor] http question

2014-11-09 Thread Steven D'Aprano
On Sat, Nov 08, 2014 at 09:53:33PM -0800, Clayton Kirkwood wrote: > >> but I also am aware of httplib2, but it still seems to be in eternal > >> alpha. > > > >What leads you to that conclusion? If you're talking about this: > > > >https://github.com/jcgregorio/httplib2 > > > >I don't see any sign

[Tutor] Test to check if values of dictionary are all equal (which happen to be dictionaries)

2014-11-09 Thread Jignesh Sutar
I needed to test if the values of all entries in a dictionary were equal but since the values themselves were dictionaries I couldn't simply take a set of the values and test if this equated to one. So I ended up taking all combination of the keys and testing pairs of sub dictionaries. I just want

Re: [Tutor] Test to check if values of dictionary are all equal (which happen to be dictionaries)

2014-11-09 Thread Peter Otten
Jignesh Sutar wrote: > I needed to test if the values of all entries in a dictionary were equal > but since the values themselves were dictionaries I couldn't simply take a > set of the values and test if this equated to one. So I ended up taking > all combination of the keys and testing pairs of

[Tutor] don't understand iteration

2014-11-09 Thread Clayton Kirkwood
I have the following code: import urllib.request,re,string months = ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'] from urllib.request import urlopen for line in urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'): line = line.decode(

Re: [Tutor] don't understand iteration

2014-11-09 Thread Dave Angel
You forgot to state your Python version. I'll assume 3.4 "Clayton Kirkwood" Wrote in message: > I have the following code: import urllib.request,re,stringmonths = > ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', > 'Oct.', 'Nov.', 'Dec.']from urllib.request import urlop

Re: [Tutor] don't understand iteration

2014-11-09 Thread Peter Otten
Clayton Kirkwood wrote: > I have the following code: > blah = > re.search(r'<\w\w>(\w{3}\.)\s+(\d{2}),\s+(\d{2}).+([AP]M)\s+(E[SD]T)', > line) > (month, day, time, ap, offset) = blah.group(1,2,3,4,5) > This works fine, but in the (month... line, I have blah.group(1,2,3,4,5), >

Re: [Tutor] don't understand iteration

2014-11-09 Thread Clayton Kirkwood
>-Original Message- >From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On >Behalf Of Dave Angel >Sent: Sunday, November 09, 2014 5:10 PM >To: tutor@python.org >Subject: Re: [Tutor] don't understand iteration > >You forgot to state your Python version. I'll assume 3.4 > >"Cl

Re: [Tutor] don't understand iteration

2014-11-09 Thread Clayton Kirkwood
>-Original Message- >From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On >Behalf Of Peter Otten >Sent: Sunday, November 09, 2014 5:47 PM >To: tutor@python.org >Subject: Re: [Tutor] don't understand iteration > >Clayton Kirkwood wrote: > >> I have the following code: > >>

Re: [Tutor] don't understand iteration

2014-11-09 Thread Ben Finney
"Clayton Kirkwood" writes: > >-Original Message- > >From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On > >Behalf Of Dave Angel (Clayton, does your mail client not present messages written by their authors? The messages should not come to you “From:” the tutor list itself