Re: Measuring time of a telnet connect

2009-04-15 Thread Fabian Lanze
Jack diederich schrieb: Has anyone an idea how to solve this? import time import telnetlib start = time.time() conn = telnetlib.Telnet('localhost', 80) print time.time() - start Perfect! Thank you.. -- http://mail.python.org/mailman/listinfo/python-list

Re: Measuring time of a telnet connect

2009-04-15 Thread Jack diederich
On Wed, Apr 15, 2009 at 3:41 AM, Fabian Lanze wrote: > > I want to realize the following: I want to measure the time it takes to > build up a telnet connection to a known host (ip/port). I tried to use > subprocess.Popen to build the telnet connection and then to catch the > "Trying to connect..."

Measuring time of a telnet connect

2009-04-15 Thread Fabian Lanze
Hi! I want to realize the following: I want to measure the time it takes to build up a telnet connection to a known host (ip/port). I tried to use subprocess.Popen to build the telnet connection and then to catch the "Trying to connect..." and "Connection established" output. But this didn't work