[Tutor] Requesting restricted URL (further authentication requested)

2010-10-19 Thread Tim Johnson
I've written the following function which successfully gets an authenticated URL: def getRestrictedURL(authName,URL,log,pswd): auth_handler = urllib2.HTTPBasicAuthHandler() auth_handler.add_password(authName, URL,log,pswd) opener = urllib2.build_opener(auth_handler)

Re: [Tutor] Requesting restricted URL (further authentication requested)

2010-10-19 Thread Vince Spicer
On Tue, Oct 19, 2010 at 1:56 PM, Tim Johnson wrote: > I've written the following function which successfully gets an > authenticated URL: > def getRestrictedURL(authName,URL,log,pswd): >auth_handler = urllib2.HTTPBasicAuthHandler() >auth_handler.add_password(authName, URL,log,pswd

Re: [Tutor] Requesting restricted URL (further authentication requested)

2010-10-19 Thread Sander Sweers
On 19 October 2010 21:56, Tim Johnson wrote: > I've written the following function which successfully gets an > authenticated URL: > def getRestrictedURL(authName,URL,log,pswd): >        auth_handler = urllib2.HTTPBasicAuthHandler() >        auth_handler.add_password(authName, URL,log,pswd) >    

Re: [Tutor] Requesting restricted URL (further authentication requested)

2010-10-19 Thread Tim Johnson
* Vince Spicer [101019 12:25]: > On Tue, Oct 19, 2010 at 1:56 PM, Tim Johnson wrote: > > > Tim, > > Unless you are tied to the standard library I would recommend looking at > > httplib2 http://code.google.com/p/httplib2/ > > This handles your authentication and connection much better then t

[Tutor] Problem with python

2010-10-19 Thread Matthew Nunes
To whom it may concern, Hi, I've just started learning how to program in python using Allan B. Downy's book "How to think like a computer scientist" and it explained something in the recursion chapter which have still been

Re: [Tutor] Problem with python

2010-10-19 Thread Alan Gauld
"Matthew Nunes" wrote... ...something in the recursion chapter which have still been unable to understand. It wrote a piece of code for the factorial function Please explain it to me, as I have spent hours trying to get my head around it, Recursion is one of the more baffling topics whe

Re: [Tutor] Problem with python

2010-10-19 Thread Emmanuel Ruellan
On Tue, Oct 19, 2010 at 11:02 PM, Matthew Nunes wrote: > > It wrote a piece of code for the factorial function in math for example 3! > is 3 * 2 * 1. I cannot understand the how it claimed the code executed, and > logically it makes no sense to me. > > I suggest you follow the algorithm yourself,

Re: [Tutor] Problem with python

2010-10-19 Thread Wayne Werner
On Tue, Oct 19, 2010 at 4:02 PM, Matthew Nunes wrote: > To whom it may concern, > >Hi, I've just started learning how to > program in python using Allan B. Downy's book "How to think like a computer > scientist" and it explained something in the recursion chapt