[BangPypers] Socket Error : Address still in use (Conveting from python 1.5.2 to 2.7.1)

2012-03-27 Thread Wah Meng Wong
Hello there,
 
I am almost done converting my application from
python 1.5.2 to python 2.7.1 on a HP-UX 11 Itanium box. 
 
My application server will set a listening port,
accepting request from multiple clients. The code just works fine in the old
python environment. E.g. when I do a lsof | grep listening port I got
the following.
 
python 62602  genasm    5u  IPv4 0x7350d1f0    0t0  TCP 
zmy02aix02:12121 (LISTEN)
python 62602  genasm    6u  IPv4 0x744fb5f0    0t0  TCP
zmy02aix02:12121-zmy02aix02-bkup:51867 (ESTABLISHED)
python 62602  genasm    7u  IPv4 0x75b959f0    0t0  TCP
zmy02aix02:12121-zmy02aix02-bkup:51869 (ESTABLISHED)
python 62602  genasm    8u  IPv4 0x75a559f0    0t0  TCP
zmy02aix02:12121-zmy02aix02-bkup:51873 (ESTABLISHED)
 
Strange things happened in python 2.7.1. Without
modifying the code of how the socket was created and how the TCP/IP address was
bound to the socket, it seems that every other processes that I run, which
supposed to connect to the listening port as a client program, also appears to
be holding a listening port. This is weird. Anyone has encountered this before
especially when you were converting from an old python to a new python? Like
you can see below there are 5 processes hosting the listening port of 18882.
 
$ lsof -i tcp | grep 18882
python  10598
r32813    3u  IPv4 0xe0050b73e400   0t0  TCP 
zmy02hp3.ap.freescale.net:18882 (LISTEN)
python  18181
r32813    3u  IPv4 0xe0050b73e400   0t0  TCP 
zmy02hp3.ap.freescale.net:18882 (LISTEN)
python  20025
r32813    3u  IPv4 0xe0050b73e400   0t0  TCP 
zmy02hp3.ap.freescale.net:18882 (LISTEN)
python  26295
r32813    3u  IPv4 0xe0050b73e400   0t0  TCP 
zmy02hp3.ap.freescale.net:18882 (LISTEN)
python  26428
r32813    3u  IPv4 0xe0050b73e400   0t0  TCP 
zmy02hp3.ap.freescale.net:18882 (LISTEN)
 
Since only one of them is the genuine process holding the
port, I need to kill off the rest of them if I need to restart the process 
which is the legitimate owner of the listening port. It should not work this 
way. 
 
Here is the code of the application process that hosts
the listening port. 
 
  self.sock =
socket.socket( socket.AF_INET, socket.SOCK_STREAM )
  self.sock.setsockopt(
socket.SOL_SOCKET, socket.SO_REUSEADDR, 1 )
  self.sock.setsockopt(
socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1
  self.sock.setsockopt(
socket.IPPROTO_TCP, _TCP_NODELAY, 1 )
  self.sock.bind(
self.server_address )
  
 
Here is the client code that does the connection.
 
   self.sock =
socket.socket( socket.AF_INET, socket.SOCK_STREAM )
   self.sock.setsockopt( socket.IPPROTO_TCP, _TCP_NODELAY, 1 )
   self.sock.connect( self.server_address )

Hope to hear something from the community. 


 
Regards,
Wah Meng
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread Anand Chitipothu
Since there's still time for the meetup, I'd like to start a thread to
 discuss if anyone has ideas for a presentation.


I can talk about how to start a python project. This includes:

* writing setup.py, Makefile, Readme
* setting up virtualenv for the project
* setting up sphinx documentation and hosting it on readthedocs.org
* writing tests and setting up continuous integration using
http://travis-ci.org/
* Making releases and uploading the packages to pypi

Anand
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread Noufal Ibrahim

I myself could speak about either pygame (game development in general)
or on the Python C API. 

-- 
~noufal
http://nibrahim.net.in

I distinctly remember forgetting that. -Clara Barton
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread Vinayak Hegde
Can I vote ? +1 for pygame. Would also like to hear experiences of
people who went to Pycon this month.

-- Vinayak

On Tue, Mar 27, 2012 at 7:54 PM, Noufal Ibrahim nou...@nibrahim.net.in wrote:

 I myself could speak about either pygame (game development in general)
 or on the Python C API.

 --
 ~noufal
 http://nibrahim.net.in

 I distinctly remember forgetting that. -Clara Barton
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread kracethekingmaker

Hi

  For past two months I am trying to attend bangpypers but 
unfortunately I was unable to attend. But this time I will make it, mean 
while how long does meet up lasts? If so I can also give some basic demo 
on Flask, requests, twitter live streaming etc . . .


From past two weeks observation can any one share the audience are 
beginners, intermediate or advanced python users.


In case time is constraint I will not present this time, next time I can 
show demo.


Probably we can watch any one pycon video(Guido's keynote or any other 
video).


+1 for Anand's topic.

Can I vote ? +1 for pygame. Would also like to hear experiences of
people who went to Pycon this month.

-- Vinayak

On Tue, Mar 27, 2012 at 7:54 PM, Noufal Ibrahimnou...@nibrahim.net.in  wrote:

I myself could speak about either pygame (game development in general)
or on the Python C API.

--
~noufal
http://nibrahim.net.in

I distinctly remember forgetting that. -Clara Barton
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers



--
Talk is cheap, show me the code -- Linus Torvalds
Regards
Kracekumar.R
www.kracekumar.com

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread Balachandran Sivakumar
Hi,

On Tue, Mar 27, 2012 at 7:54 PM, Noufal Ibrahim nou...@nibrahim.net.in wrote:

 I myself could speak about either pygame (game development in general)
 or on the Python C API.


 +1 for both the topics - Python project creation and pygame.

Anand, it would be great if you could demo it with a real world
project, not a hello world project :) But anything would be fine.
Thanks

-- 
Thank you
Balachandran Sivakumar

Arise Awake and stop not till the goal is reached.
                                                             - Swami Vivekananda

Mail: benignb...@gmail.com
Blog: http://benignbala.wordpress.com/
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread Arjun R




Wow amazing topics this time. 

+1 - anand

+1 - Python C API

+1 - PyCon
+1 - Flask/Werkzeug or CherryPy??
@krace I'm a student having only a few project experiences with Python. As long 
as you dont direc

 From: benignb...@gmail.com
 Date: Tue, 27 Mar 2012 22:02:40 +0530
 To: bangpypers@python.org
 Subject: Re: [BangPypers] April meetup
 
 Hi,
 
 On Tue, Mar 27, 2012 at 7:54 PM, Noufal Ibrahim nou...@nibrahim.net.in 
 wrote:
 
  I myself could speak about either pygame (game development in general)
  or on the Python C API.
 
 
  +1 for both the topics - Python project creation and pygame.
 
 Anand, it would be great if you could demo it with a real world
 project, not a hello world project :) But anything would be fine.
 Thanks
 
 -- 
 Thank you
 Balachandran Sivakumar
 
 Arise Awake and stop not till the goal is reached.
  - Swami 
 Vivekananda
 
 Mail: benignb...@gmail.com
 Blog: http://benignbala.wordpress.com/
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers

  
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread kracethekingmaker

Hi




Wow amazing topics this time.

+1 - anand

+1 - Python C API

+1 - PyCon
+1 - Flask/Werkzeug or CherryPy??
@krace I'm a student having only a few project experiences with Python. As long 
as you dont direc

I will make sure, I keep things very simple.

@arjun:

`As long as you dont direc`

I din get this.



From: benignb...@gmail.com
Date: Tue, 27 Mar 2012 22:02:40 +0530
To: bangpypers@python.org
Subject: Re: [BangPypers] April meetup

Hi,

On Tue, Mar 27, 2012 at 7:54 PM, Noufal Ibrahimnou...@nibrahim.net.in  wrote:

I myself could speak about either pygame (game development in general)
or on the Python C API.


  +1 for both the topics - Python project creation and pygame.

Anand, it would be great if you could demo it with a real world
project, not a hello world project :) But anything would be fine.
Thanks

--
Thank you
Balachandran Sivakumar

Arise Awake and stop not till the goal is reached.
  - Swami 
Vivekananda

Mail: benignb...@gmail.com
Blog: http://benignbala.wordpress.com/
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers



--
Talk is cheap, show me the code -- Linus Torvalds
Regards
Kracekumar.R
www.kracekumar.com

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread Arjun R


@krace I'm a student having only a few project experiences with Python. As long 
as you dont directly go advanced, I guess I can follow. 
Sorry for the spamming guys. 

 Date: Tue, 27 Mar 2012 23:04:04 +0530
 From: kracethekingma...@gmail.com
 To: bangpypers@python.org
 Subject: Re: [BangPypers] April meetup
 
 Hi
 
 
 
  Wow amazing topics this time.
 
  +1 - anand
 
  +1 - Python C API
 
  +1 - PyCon
  +1 - Flask/Werkzeug or CherryPy??
  @krace I'm a student having only a few project experiences with Python. As 
  long as you dont direc
 I will make sure, I keep things very simple.
 
 @arjun:
 
 `As long as you dont direc`
 
 I din get this.
 
 
  From: benignb...@gmail.com
  Date: Tue, 27 Mar 2012 22:02:40 +0530
  To: bangpypers@python.org
  Subject: Re: [BangPypers] April meetup
 
  Hi,
 
  On Tue, Mar 27, 2012 at 7:54 PM, Noufal Ibrahimnou...@nibrahim.net.in  
  wrote:
  I myself could speak about either pygame (game development in general)
  or on the Python C API.
 
+1 for both the topics - Python project creation and pygame.
 
  Anand, it would be great if you could demo it with a real world
  project, not a hello world project :) But anything would be fine.
  Thanks
 
  -- 
  Thank you
  Balachandran Sivakumar
 
  Arise Awake and stop not till the goal is reached.
- Swami 
  Vivekananda
 
  Mail: benignb...@gmail.com
  Blog: http://benignbala.wordpress.com/
  ___
  BangPypers mailing list
  BangPypers@python.org
  http://mail.python.org/mailman/listinfo/bangpypers
  
  ___
  BangPypers mailing list
  BangPypers@python.org
  http://mail.python.org/mailman/listinfo/bangpypers
 
 
 -- 
 Talk is cheap, show me the code -- Linus Torvalds
 Regards
 Kracekumar.R
 www.kracekumar.com
 
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers
  
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread kracethekingmaker

Hi


@krace I'm a student having only a few project experiences with Python. As long 
as you dont directly go advanced, I guess I can follow.


Yes, I will make things simpler.

Sorry for the spamming guys.


Date: Tue, 27 Mar 2012 23:04:04 +0530
From: kracethekingma...@gmail.com
To: bangpypers@python.org
Subject: Re: [BangPypers] April meetup

Hi



Wow amazing topics this time.

+1 - anand

+1 - Python C API

+1 - PyCon
+1 - Flask/Werkzeug or CherryPy??
@krace I'm a student having only a few project experiences with Python. As long 
as you dont direc

I will make sure, I keep things very simple.

@arjun:

`As long as you dont direc`

I din get this.



From: benignb...@gmail.com
Date: Tue, 27 Mar 2012 22:02:40 +0530
To: bangpypers@python.org
Subject: Re: [BangPypers] April meetup

Hi,

On Tue, Mar 27, 2012 at 7:54 PM, Noufal Ibrahimnou...@nibrahim.net.in   wrote:

I myself could speak about either pygame (game development in general)
or on the Python C API.


   +1 for both the topics - Python project creation and pygame.

Anand, it would be great if you could demo it with a real world
project, not a hello world project :) But anything would be fine.
Thanks

--
Thank you
Balachandran Sivakumar

Arise Awake and stop not till the goal is reached.
   - Swami 
Vivekananda

Mail: benignb...@gmail.com
Blog: http://benignbala.wordpress.com/
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


--
Talk is cheap, show me the code -- Linus Torvalds
Regards
Kracekumar.R
www.kracekumar.com

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers



--
Talk is cheap, show me the code -- Linus Torvalds
Regards
Kracekumar.R
www.kracekumar.com

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread yeswanth
Hi,
I can give an introduction to ZeroMQ asynchronous messaging library if any
one is interested :)

On Tue, Mar 27, 2012 at 11:09 PM, kracethekingmaker 
kracethekingma...@gmail.com wrote:

 Hi


 @krace I'm a student having only a few project experiences with Python.
 As long as you dont directly go advanced, I guess I can follow.


 Yes, I will make things simpler.

  Sorry for the spamming guys.

  Date: Tue, 27 Mar 2012 23:04:04 +0530
 From: kracethekingma...@gmail.com
 To: bangpypers@python.org
 Subject: Re: [BangPypers] April meetup

 Hi



 Wow amazing topics this time.

 +1 - anand

 +1 - Python C API

 +1 - PyCon
 +1 - Flask/Werkzeug or CherryPy??
 @krace I'm a student having only a few project experiences with Python.
 As long as you dont direc

 I will make sure, I keep things very simple.

 @arjun:

 `As long as you dont direc`

 I din get this.


  From: benignb...@gmail.com
 Date: Tue, 27 Mar 2012 22:02:40 +0530
 To: bangpypers@python.org
 Subject: Re: [BangPypers] April meetup

 Hi,

 On Tue, Mar 27, 2012 at 7:54 PM, Noufal Ibrahimnou...@nibrahim.net.in
 **   wrote:

 I myself could speak about either pygame (game development in general)
 or on the Python C API.

+1 for both the topics - Python project creation and pygame.

 Anand, it would be great if you could demo it with a real world
 project, not a hello world project :) But anything would be fine.
 Thanks

 --
 Thank you
 Balachandran Sivakumar

 Arise Awake and stop not till the goal is reached.
   - Swami
 Vivekananda

 Mail: benignb...@gmail.com
 Blog: http://benignbala.wordpress.**com/http://benignbala.wordpress.com/
 __**_
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers


 __**_
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers


 --
 Talk is cheap, show me the code -- Linus Torvalds
 Regards
 Kracekumar.R
 www.kracekumar.com

 __**_
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers


 __**_
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers



 --
 Talk is cheap, show me the code -- Linus Torvalds
 Regards
 Kracekumar.R
 www.kracekumar.com

 __**_
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers




-- 
Regards,
Yeswanth
http://advencode.wordpress.com/
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread kracethekingmaker

Hi

I can give an introduction to ZeroMQ asynchronous messaging library if any
one is interested :)


I thought about it but, felt advanced, so ignored, love to hear :)

On Tue, Mar 27, 2012 at 11:09 PM, kracethekingmaker
kracethekingma...@gmail.com  wrote:


Hi



@krace I'm a student having only a few project experiences with Python.
As long as you dont directly go advanced, I guess I can follow.


Yes, I will make things simpler.

  Sorry for the spamming guys.

  Date: Tue, 27 Mar 2012 23:04:04 +0530

From: kracethekingma...@gmail.com
To: bangpypers@python.org
Subject: Re: [BangPypers] April meetup

Hi



Wow amazing topics this time.

+1 - anand

+1 - Python C API

+1 - PyCon
+1 - Flask/Werkzeug or CherryPy??
@krace I'm a student having only a few project experiences with Python.
As long as you dont direc


I will make sure, I keep things very simple.

@arjun:

`As long as you dont direc`

I din get this.


  From: benignb...@gmail.com

Date: Tue, 27 Mar 2012 22:02:40 +0530
To: bangpypers@python.org
Subject: Re: [BangPypers] April meetup

Hi,

On Tue, Mar 27, 2012 at 7:54 PM, Noufal Ibrahimnou...@nibrahim.net.in
**wrote:


I myself could speak about either pygame (game development in general)
or on the Python C API.

+1 for both the topics - Python project creation and pygame.

Anand, it would be great if you could demo it with a real world
project, not a hello world project :) But anything would be fine.
Thanks

--
Thank you
Balachandran Sivakumar

Arise Awake and stop not till the goal is reached.
   - Swami
Vivekananda

Mail: benignb...@gmail.com
Blog: http://benignbala.wordpress.**com/http://benignbala.wordpress.com/
__**_
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers


__**_
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers


--
Talk is cheap, show me the code -- Linus Torvalds
Regards
Kracekumar.R
www.kracekumar.com

__**_
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers


__**_
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers



--
Talk is cheap, show me the code -- Linus Torvalds
Regards
Kracekumar.R
www.kracekumar.com

__**_
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers







--
Talk is cheap, show me the code -- Linus Torvalds
Regards
Kracekumar.R
www.kracekumar.com

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread Noufal Ibrahim
Vinayak Hegde vinay...@gmail.com writes:

 Can I vote ? +1 for pygame. Would also like to hear experiences of
 people who went to Pycon this month.

[...]

I think a lot of people are interested in Anand's topic. Perhaps we
should prioritise that and if there's time, I can speak a little about
PyGame. 


-- 
~noufal
http://nibrahim.net.in

Our similarities are different. -Dale Berra, son of Yogi
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread kracethekingmaker

Yes, +1 .

Vinayak Hegdevinay...@gmail.com  writes:


Can I vote ? +1 for pygame. Would also like to hear experiences of
people who went to Pycon this month.

[...]

I think a lot of people are interested in Anand's topic. Perhaps we
should prioritise that and if there's time, I can speak a little about
PyGame.





--
Talk is cheap, show me the code -- Linus Torvalds
Regards
Kracekumar.R
www.kracekumar.com

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] April meetup

2012-03-27 Thread Arunkumar Jigajinni
+1 - Anand

On Wed, Mar 28, 2012 at 12:03 AM, kracethekingmaker 
kracethekingma...@gmail.com wrote:

 Yes, +1 .

  Vinayak Hegdevinay...@gmail.com  writes:

  Can I vote ? +1 for pygame. Would also like to hear experiences of
 people who went to Pycon this month.

 [...]

 I think a lot of people are interested in Anand's topic. Perhaps we
 should prioritise that and if there's time, I can speak a little about
 PyGame.




 --
 Talk is cheap, show me the code -- Linus Torvalds
 Regards
 Kracekumar.R
 www.kracekumar.com

 __**_
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers