Re: [Tutor] urlopen: where are the results?

2006-03-24 Thread Alan Gauld
> >And if you went to the index and click 'f' you will find a link > How do I get to the index?? There should be a link at the top of each document page HTH, Alan G. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] urlopen: where are the results?

2006-03-24 Thread Kermit Rose
    From: Alan Gauld Date: 03/23/06 11:34:33 To: Kermit Rose; Danny Yoo Cc: tutor@python.org Subject: Re: [Tutor] urlopen: where are the results?     Did you look at the url2lib documentation?       I thought I had,  but I did not see the examples.   I did not know enough to make sense

Re: [Tutor] urlopen: where are the results?

2006-03-23 Thread Alan Gauld
> >>> urlopen("http://www.kermitrose.com";) > 0x00CDD768>> > should I have assigned a name to the file by > website = urlopen(" http://www.kermitrose.com"; ) ? Yes thats the idea. Its not really a file, but its what Python calls a "file-like object" That is it behaves like a file in t

Re: [Tutor] urlopen: where are the results?

2006-03-23 Thread gv
On 3/23/06, Kermit Rose <[EMAIL PROTECTED]> wrote: > And I had not yet found out about the read function, so even if I had > understood > that urlopen returned a file , I still would not have know how to see the > contents > of that file. > > I will search for the read function in the tutorial

Re: [Tutor] urlopen: where are the results?

2006-03-23 Thread Kermit Rose
    From: Danny Yoo Date: 03/23/06 00:08:25 To: Kermit Rose Cc: tutor@python.org Subject: Re: [Tutor] urlopen: where are the results?      We can use 'import urllib2', or if we really want urlopen():   ## from urllib2 import urlopen ##   Thanks.     > >

Re: [Tutor] urlopen: where are the results?

2006-03-23 Thread Alan Gauld
> Anybody care to comment on the following? > from urllib2 import * Its considered bad practice to use from foo import * but at the >>> prompt its not too bad. urlopen("http://www.kermitrose.com";) > 0x00CDD768>> Looks good. What did you expect? Alan G ___

Re: [Tutor] urlopen: where are the results?

2006-03-22 Thread Danny Yoo
On Wed, 22 Mar 2006, Kermit Rose wrote: > Anybody care to comment on the following? > > >>> from urllib2 import * Don't do this. *grin* Using 'from [modulename] import *' is not so good in Python because there's no warning if one of the contents in the module is overriding an existing definit

[Tutor] urlopen: where are the results?

2006-03-22 Thread Kermit Rose
Anybody care to comment on the following? >>> from urllib2 import * >>> urlopen("http://www.kermitrose.com";) > >>> ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor