Re: socket and subprocess problem

2008-12-15 Thread goatold
Guys thanks to point it out. Yes, it's a race problem. I tried sleep long enough, then I can connect to the socket. I should add code to try to connect to the socket for a given time out. Roy Smith wrote: > In article > <6d3291c3-4e12-4bdd-884a-21f15f38d...@a12g2000pro.googlegroups.com>, > goat..

socket and subprocess problem

2008-12-15 Thread goatold
Hi all, Here is my problem, see if any one else met this before In my python code I use subprocess.Popen to run and external program who will listen to a TCP port. And I also create a socket to connect to the TCP port that the external program is listening. I will get 'Connection refused, errno=11

Reflectiong capabilityof Python

2008-11-25 Thread goatold
Can Python create object by name? Like clsName = "ClassA" aObj = createObjectByName(clsName) -- http://mail.python.org/mailman/listinfo/python-list