Re: [Tutor] How to use diff.py?

2007-01-28 Thread Dick Moores
At 04:54 AM 1/27/2007, Kent Johnson wrote: >Dick Moores wrote: >>At 12:16 PM 1/26/2007, you wrote: >>>I've found diff.py in Python25\Tools\Scripts. But I don't see how >>>to use it to find the differences between 2 files, say file1.txt >>>and file2.txt. I was hoping it would work like unix's diff

[Tutor] question about a list of lists

2007-01-28 Thread shawn bright
lo there all. i have a list of lists that i want to build, only if an item is not in the list already. kinda like this new_list = [] for item in lists: # item will look something like [var1, var2, var3] if item[0] in new_list ( only the first element of each list ) like new_list[0][0] basicl

Re: [Tutor] Does Python have any callback function?

2007-01-28 Thread Wong Vincent
Dear tutor, My current application has 2 python scripts running in parallel, say script A and B. script A: GUI script B: data processing. A will invoke B to run. If I would like B to update processing status to A(so that user is able to see realtime status), how can I do it?

Re: [Tutor] Does Python have any callback function?

2007-01-28 Thread Carlos Daniel Ruvalcaba Valenzuela
That depends very much on how you are running both scripts in parallel, if you are using Threads or process. If using threads you can share a variable or object between the scripts read it on A to check for updates and lock and update on B (using semaphores for examples), there is an Event object

[Tutor] Help Please

2007-01-28 Thread Python Freak
Hi, This may be too elementary for most of you, but could you please help me with the following question? I would like to use comprehensive lists and lists of lists. Where do I start? Question: Consider a digraph with 10 vertices, labeled 1 through 10. You are given the following adjacency list

Re: [Tutor] Help Please

2007-01-28 Thread Danny Yoo
> This may be too elementary for most of you, but could you please help me > with the following question? This is almost certainly a homework problem. We are very restricted in what we can do to help. See: http://www.catb.org/~esr/faqs/smart-questions.html#homework > I would like to u

Re: [Tutor] Best IDE for Python

2007-01-28 Thread anil maran
Vim and emacs are equally good shawn bright <[EMAIL PROTECTED]> wrote: i think pydev ( an eclipse plugin ) can too. shawn On 1/27/07, Dick Moores <[EMAIL PROTECTED]> wrote: At 07:12 PM 1/24/2007, Shadab Sayani wrote: Hi, I am using vim editor to code my project in python.Is there a good IDE

Re: [Tutor] Does Python have any callback function?

2007-01-28 Thread Alan Gauld
"Wong Vincent" <[EMAIL PROTECTED]> wrote > My current application has 2 python scripts running in parallel, say > script A and B. > script A: GUI > script B: data processing. OK, Thats a slightly unusual way to do things unless the data processing is acting as a server for multiple clients. Norm

Re: [Tutor] question about a list of lists

2007-01-28 Thread Alan Gauld
"shawn bright" <[EMAIL PROTECTED]> wrote > new_list = [] > for item in lists: # item will look something like [var1, var2, > var3] >if item[0] in new_list > basicly, i want to know if item[0] is one of the items[0] in my > new_list Your pseudo code is pretty much exactly right. What mor

Re: [Tutor] Help Please

2007-01-28 Thread Alan Gauld
"Python Freak" <[EMAIL PROTECTED]> wrote > This may be too elementary for most of you, but could you please > help me > with the following question? I would like to use comprehensive lists > and > lists of lists. Where do I start? Assuming you mean list comprehensions and lists of lists then m

[Tutor] Internal Python memory dump

2007-01-28 Thread Keo Sophon
Hi, Does anyone know where I can find documents of Internal python memory dump? thanks, Phon ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Help Please

2007-01-28 Thread Python Freak
Hi, This may be too elementary for most of you, but could you please help me with the following question? I would like to use comprehensive lists and lists of lists. Where do I start? Question: Consider a digraph with 10 vertices, labeled 1 through 10. You are given the following adjacency list

Re: [Tutor] question about a list of lists

2007-01-28 Thread Kent Johnson
shawn bright wrote: > lo there all. > > i have a list of lists that i want to build, only if an item is not in > the list already. > > kinda like this > new_list = [] > for item in lists: # item will look something like [var1, var2, var3] > if item[0] in new_list ( only the first element of