Curses programming, threads?

2004-12-03 Thread Bartlomiej Rymarski
Hello, I'm writing this little program, and I've came across a function that I need to call. Since the execution of the function takes a real long time I want to put a timer, or an animated 'loading' screen (it would be best if it was a progressbar). The questions is how to make two commands to

Re: Curses programming, threads?

2004-12-03 Thread Bartlomiej Rymarski
Bartlomiej Rymarski <[EMAIL PROTECTED]> wrote: > [...] > And the loader() function would run in a loop until connect_db() is > is finished. Is that possible in python? Or are there any other, > better ways to do it? > [...] Oh, I forgot - I'm using Linux, and c

Re: Curses programming, threads?

2004-12-06 Thread Bartlomiej Rymarski
Michele Simionato <[EMAIL PROTECTED]> wrote: > You don't need curses. Some time ago somebody (I forgot the name) > posted this spinner class: > > class Spinner( threading.Thread ): # a google search should find the author > [...] Great, thanks a lot. -- Bartek Rymarski <[EMAIL PROTECTED]> $ %bl

Re: Curses programming, threads?

2004-12-06 Thread Bartlomiej Rymarski
Carl Banks <[EMAIL PROTECTED]> wrote: > (...) > But I recommend threads for this. It's one of the easiest possible > uses of threads. There's no complex communication involved; locks and > semaphores and stuff aren't required. Just connect to the database in > a subthread, and have it set a glo