Re: [Python-Dev] hi everyone

2009-08-09 Thread Billy Earney
There's also the diveintopython.org website that contains a free ebook about
python..
That's what I used to get started :)

-Original Message-
From: python-dev-bounces+billy.earney=gmail@python.org
[mailto:python-dev-bounces+billy.earney=gmail@python.org] On Behalf Of
s...@pobox.com
Sent: Sunday, August 09, 2009 6:27 AM
To: Nick Coghlan
Cc: malathi selvaraj; Jeroen Ruigrok van der Werven; python-dev@python.org
Subject: Re: [Python-Dev] hi everyone


Nick> Specifically, python-l...@python.org (also available as the
Nick> newsgroup comp.lang.python).

Also, if you're a complete beginner, try subscribing to tu...@python.org:

http://mail.python.org/mailman/listinfo/tutor

and reading through that list's ten year's worth of archived postings.
(Maybe someone create a BestOfTutor wiki page?)

-- 
Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/
Getting old sucks, but it beats dying young
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/billy.earney%40gmail.com

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] socket.create_connection slow

2009-01-14 Thread Billy Earney
This may be way out on a limb, but could it be a reverse lookup issue?

-Original Message-
From: python-dev-bounces+billy.earney=gmail@python.org 
[mailto:python-dev-bounces+billy.earney=gmail@python.org] On Behalf Of 
Kristján Valur Jónsson
Sent: Wednesday, January 14, 2009 8:36 AM
To: Victor Stinner; python-dev@python.org
Subject: Re: [Python-Dev] socket.create_connection slow

I have no idea why the connect refusal takes so long.
Maybe it's a vista thing?
 from socket import *
 socket(AF_INET6).connect(("::1", 8080))

takes about one second to report active refusal.  But so does an IPv4 connect.  
Maybe it is some kind of DOS attack throttling?  I couldn't find any info.


I've already asked the client in the test to use IPV4 by specifying the 
connection address as an IPv4 tuple ("http://127.0.0.1:...";).  I see no other 
way to do it without extensive subclassing because the HTTPConnection() class 
uses socket.create_connection().

Cheers,

Kristján

-Original Message-
From: python-dev-bounces+kristjan=ccpgames@python.org 
[mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of 
Victor Stinner
Sent: 14. janúar 2009 12:46
To: python-dev@python.org
Subject: Re: [Python-Dev] socket.create_connection slow

Hi,

Le Wednesday 14 January 2009 12:23:46 Kristján Valur Jónsson, vous avez 
écrit :
> socket.create_connection() trying to connect to ("localhost", port)
> (...) 
> return an AF_INET6 entry before the AF_INET one and try connection 
> to that. This connect() attemt fails after approximately one second, 
> after which we proceed to do an immediately successful connect() call 
> to the AF_INET address.

This is the normal behaviour of dual stack (IPv4+IPv6): IPv6 is tried before 
IPv4. SocketServer uses AF_INET by default, so the "IPv6 port" is closed on 
your host. Why does it take so long to try to connect to the IPv6 port? On 
Linux, it's immediate:

$ time nc6 ::1 8080
nc6: unable to connect to address ::1, service 8080

real0m0.023s
user0m0.000s
sys 0m0.008s


On my host (Ubuntu Gutsy), "localhost" name has only an IPv4 address. The 
address "::1" is "ip6-localhost" or "ip6-loopback".

You should check why the connect() to IPv6 is so long to raise an error. About 
the test: since SocketServer address family is constant (IPv4), you can force 
IPv4 for the client.

-- 
Victor Stinner aka haypo
http://www.haypocalc.com/blog/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/kristjan%40ccpgames.com
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/billy.earney%40gmail.com

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com