[Tutor] Python and wx questions

Krisztian Kepes Kepes.Krisztian@peto.hu
Tue Jun 17 04:54:02 2003


Hi !

More of questions I have.
I want to port an Delphi program to wxPython/Python.
Please help me !

1.
When I write an wx application that is making a long time 
process of datas, how I avoid the blank windows, how I refresh ?
I think the solution is thread, but I don't know (in Python).

1.a.
How I create a thread procedure ?

1.b.
How I send a signal to main thread ?

1.c.
How I terminate the process thread ?

1.d
How I protect the shared data from cross writing of threads ?
(Have a mutex or other (critical section ?))

2.
How I allocate a fixed length list in one command ?
Have the Python a command to allocate in one step ?
Like:
 SetLength(List,50);
I want more efficiency than this:
List=[];for i in range(0,50):List.Add(None)
or a shorter code.

3.
Have the wx an timer or a dummy procedure ?
I want it to use to periodically get the process thread's datas
(report), and write it to log memo.
Have I register my owned dummy proc ?

Thanx for the answer, or I you send me an url or example to I learn
it:
 KK