problem with urllib

2009-03-31 Thread venkat sanaka
hii everyone I am new to python programming.And i started implementing a http client using urllib in which i was facing a problem with proxy support.i was behind a proxy server and need to use proxy of format 10.1.2.21:8080 to connect to internet.when i used this with proxyhandler of urllib i got

Re: problem with urllib

2009-03-31 Thread venkat sanaka
as to be used in proxies list but my proxy address is 10.1.2.21:9090 and it is squid proxy server. Regards venkat On Wed, Apr 1, 2009 at 4:35 AM, Chris Rebert wrote: > 2009/3/31 venkat sanaka : > > hii everyone > > > > I am new to python programming.And i started implementing a

Re: problem with urllib

2009-03-31 Thread venkat sanaka
Yeah I did i was getting the same error as i got without using http in the url. Regards venkat. On Wed, Apr 1, 2009 at 4:46 AM, Chris Rebert wrote: > > On Wed, Apr 1, 2009 at 4:35 AM, Chris Rebert wrote: > >> > >> 2009/3/31 venkat sanaka : > >> > hii every

Re: problem with urllib

2009-03-31 Thread venkat sanaka
wrote: > venkat sanaka wrote: > >> Yeah I did i was getting the same error as i got without using http in the >> url. >> >> > In your first message you say you need to use proxy of format > 10.1.2.21:8080 -- but in your code example you've written and th

Re: problem with urllib

2009-03-31 Thread venkat sanaka
Thanks for ur suggestions Terry.These are really helpful for a newbie like me in python programming. Regards Venkat On Wed, Apr 1, 2009 at 5:59 AM, Terry Reedy wrote: > venkat sanaka wrote: > >> This was the code i executed. >> >> >>> proxies={'http&#

Re: problem with urllib

2009-03-31 Thread venkat sanaka
n the documentation.Thanks a lot for ur replies. Final code: >>>import urllib2 >>> opener = urllib2.build_opener() >>> opener.add_header = [('User-agent', 'Mozilla')] >>>res=opener.open('http://www.google.com') >>> print res.read() On Wed, A

"str object is not callable" error

2009-04-08 Thread venkat sanaka
HIi everyone. i was using python/c api to call a python function from c and I know the name of the function which i want to call.Is there any way to do that?? This is the method i tried... for eg:This is the python function i wants to call. >>>def add(x): ... return x+10 This is my code i