Ethereal-users: [Ethereal-users] POPEN Query

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Munshi, Shahid K. (Manpower Contract)" <shahid.k.munshi@xxxxxx>
Date: Mon, 29 Sep 2003 13:27:26 -0500
I am trying to open process using popen and some delay trying to close to close this process on windows 2000 platform.

import win32all,time

x = win32pipe.popen("windump -l > Test",'w+')
TooMuchTime = 60
print " You are waiting here for %s seconds......." %(TooMuchTime)
TotalTime = time.time() + TooMuchTime
while time.time() < TotalTime:
        time.sleep(1.0)
        print "",TotalTime - time.time()
print " Closing Captured file"
x.close()
   
When I execute this code, The process hangs at x.close()  and also I could not open "Test" file where I redirected my output. When I saw Task bar in Windows 2000, The windump is running until I manually pressed CTRL + C.

Any one can help?