Re: [Tutor] format string

2006-07-19 Thread Kent Johnson
devayani barve wrote: > Hi > > This is my program: > > import urllib > ans='y' > while ans=='y': > name=raw_input("Enter search:") > name=name.replace(' ','+') > name=name.replace('&','%26') > go_url=" http://www.google.co.in/search?hl=en&q=%s >

Re: [Tutor] format string

2006-07-19 Thread Danny Yoo
> It gives following error: > Traceback (most recent call last): > File "C:\python\urllib.py", line 1, in -toplevel- > import urllib > File "C:\python\urllib.py", line 9, in -toplevel- > page = urllib.urlopen(go_url).read() > AttributeError: 'module' object has no attribute 'urlopen' Hi Devan

[Tutor] format string

2006-07-19 Thread devayani barve
Hi   This is my program: import urllibans='y'while ans=='y':        name=raw_input("Enter search:")    name=name.replace(' ','+')    name=name.replace('&','%26')    go_url=" http://www.google.co.in/search?hl=en&q=%s" %name+"&meta=lr\%3Dlang_en"    print go_url    page = urllib.urlopen(go_url).read