[Tutor] Problem with threads

2006-02-24 Thread David Cohen
Hi all, I have a problem trying to use thread on python. I import the threading module and execute this: def func_thread(): something... new_thread = threading.Thread(target = func_thread) new_thread.start() But the thread never really starts, just when I call the new_thread.join() method.

Re: [Tutor] Finding items in a list

2006-02-24 Thread Kent Johnson
Emily, As Danny suggests, a concrete example of your input and output would be very helpful. It sounds like you have some data that looks like CLUSTER 1 SOMETHING ELSE CLUSTER 5 MORE STUFF ETC and you would like to make a list of [1, 5] - the data after 'CLUSTER'. Is that right? Here is someth

Re: [Tutor] Grepping a file for words in a list

2006-02-24 Thread John Purser
On Fri, 24 Feb 2006 12:23:22 -0800 (PST) Danny Yoo <[EMAIL PROTECTED]> wrote: > > > On Fri, 24 Feb 2006, John Purser wrote: > > > I'm writing a system admin script in python that checks recently > > accessed files for keywords like "failed, denied, error,..." etc. > > I'm using popen to call gr

Re: [Tutor] Grepping a file for words in a list

2006-02-24 Thread Danny Yoo
On Fri, 24 Feb 2006, John Purser wrote: > I'm writing a system admin script in python that checks recently > accessed files for keywords like "failed, denied, error,..." etc. I'm > using popen to call grep -F but it's VERY slow. Can > anyone suggest a faster method to do this? Hi John, Thi

Re: [Tutor] Grepping a file for words in a list

2006-02-24 Thread Bob Gailer
John Purser wrote: > Hello, > > I'm writing a system admin script in python that checks recently > accessed files for keywords like "failed, denied, error,..." etc. I'm > using popen to call grep -F but it's VERY slow. Can > anyone suggest a faster method to do this? > I don't know whether i

[Tutor] Grepping a file for words in a list

2006-02-24 Thread John Purser
Hello, I'm writing a system admin script in python that checks recently accessed files for keywords like "failed, denied, error,..." etc. I'm using popen to call grep -F but it's VERY slow. Can anyone suggest a faster method to do this? Thanks, John Purser Ubuntu Linux Python 2.4 -- Courag

Re: [Tutor] Finding items in a list

2006-02-24 Thread Danny Yoo
On Fri, 24 Feb 2006, Emily Patek wrote: > I am trying to break apart a list into several smaller lists based on > repeating nearly identical entries. For example, every so often there > is the word CLUSTER with a number after it, like CLUSTER 1. I can find > them one by one, but would like to

[Tutor] Finding items in a list

2006-02-24 Thread Emily Patek
Hi - I am trying to break apart a list into several smaller lists based on repeating nearly identical entries. For example, every so often there is the word CLUSTER with a number after it, like CLUSTER 1. I can find them one by one, but would like to do a while loop for while item in list = C

Re: [Tutor] Tkinter, Frame and Canvas question.

2006-02-24 Thread Michael Lange
On Thu, 23 Feb 2006 11:26:44 -0600 Hugo González Monteverde <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm running into trouble displaying some Tkinter Canvases, they keep a > border between themselves and there's no way I can have them display > without a grey gap between them. > > I've narrowe