Re: checking that process binds a port, fuser functionality

2010-08-03 Thread Zdenek Maxa
wrote: On Mon, 02 Aug 2010 23:27:37 +0200, Zdenek Maxa wrote: I need to start a process (using subprocess.Popen()) and wait until the new process either fails or successfully binds a specified port. If you just need to wait until *something* is listening on that port, you could try connect()ing

checking that process binds a port, fuser functionality

2010-08-02 Thread Zdenek Maxa
Hello, I need to start a process (using subprocess.Popen()) and wait until the new process either fails or successfully binds a specified port. The fuser command seems to be indented exactly for this purpose. Could anyone please provided a hint to a handy Python library to do this or would the

Tkinter.Canvas thread safety problem?

2009-07-07 Thread Zdenek Maxa
Hello, I have started a project using Tkinter. The application performs some regular checks in a thread and updates Canvas components. I have observed that sometimes the application hangs when it is about to call canvas.itemconfig() when the thread is about to terminate in the next loop.

Re: multiline regular expression (replace)

2007-05-30 Thread Zdenek Maxa
Multiline Be aware that . matches NO newlines!!! May be this caused your problems? regards Holger Zdenek Maxa wrote: [EMAIL PROTECTED] wrote: On May 29, 2:03 am, Zdenek Maxa [EMAIL PROTECTED] wrote: Hi all, I would like to perform regular expression

multiline regular expression (replace)

2007-05-29 Thread Zdenek Maxa
Hi all, I would like to perform regular expression replace (e.g. removing everything from within tags in a XML file) with multiple-line pattern. How can I do this? where = open(filename).read() multilinePattern = ^tag \/tag$ re.search(multilinePattern, where, re.MULTILINE) Thanks

Re: multiline regular expression (replace)

2007-05-29 Thread Zdenek Maxa
[EMAIL PROTECTED] wrote: On May 29, 2:03 am, Zdenek Maxa [EMAIL PROTECTED] wrote: Hi all, I would like to perform regular expression replace (e.g. removing everything from within tags in a XML file) with multiple-line pattern. How can I do this? where = open(filename).read