urllib.urlopen fails in Emacs

Niklas Norrthon niklas.norrthon at hotmail.com
Fri Sep 26 07:02:57 EDT 2008


On 26 Sep, 12:21, Wojtek Walczak <gmin... at bzt.bzt> wrote:
> On Fri, 26 Sep 2008 02:23:18 -0600, Iain Dalton wrote:
> > InEmacs, using run-python,
>
> >     import urllib
> >    urllib.urlopen('http://www.google.com/')
>
> > results in this traceback:
> ...
> >     IOError: [Errno socket error] (111, 'Connection refused')
>
> > It works fine from the command line.  Why is this happening?
>
> I can't answer your question, since I don't useemacs,
> but it looks likeemacshas some kind of built in firewall.
>
> ;-)
>
> --
> Regards,
> Wojtek Walczak,http://tosh.pl/gminick/

I don't think it is emacs... It works for me, using emacs 22.1, python
2.5.1, and windows XP:

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> urllib.urlopen('http://www.google.com/')
<addinfourl at 12530592 whose fp = <socket._fileobject object at
0x00BF4030>>
>>>

/Niklas Norrthon



More information about the Python-list mailing list